From 5dbab5e871da92b76fe8ba2360fbb673bfada411 Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Wed, 24 Feb 2016 21:27:21 +0000 Subject: [PATCH] Adding tests for NullDeployment --- .../DeploymentComplete/NullDeploymentTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 octopus-build-trigger-server/src/test/java/com/mjrichardson/teamCity/buildTriggers/DeploymentComplete/NullDeploymentTest.java diff --git a/octopus-build-trigger-server/src/test/java/com/mjrichardson/teamCity/buildTriggers/DeploymentComplete/NullDeploymentTest.java b/octopus-build-trigger-server/src/test/java/com/mjrichardson/teamCity/buildTriggers/DeploymentComplete/NullDeploymentTest.java new file mode 100644 index 0000000..e112231 --- /dev/null +++ b/octopus-build-trigger-server/src/test/java/com/mjrichardson/teamCity/buildTriggers/DeploymentComplete/NullDeploymentTest.java @@ -0,0 +1,15 @@ +package com.mjrichardson.teamCity.buildTriggers.DeploymentComplete; + +import com.mjrichardson.teamCity.buildTriggers.NullOctopusDate; +import org.testng.Assert; +import org.testng.annotations.Test; + +@Test +public class NullDeploymentTest { + public void null_release_sets_fields_to_empty() { + Deployment sut = new NullDeployment(); + Assert.assertEquals(sut.environmentId, ""); + Assert.assertEquals(sut.latestDeployment.getClass(), NullOctopusDate.class); + Assert.assertEquals(sut.latestSuccessfulDeployment.getClass(), NullOctopusDate.class); + } +}