summaryrefslogtreecommitdiffstats
path: root/asdctool/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/src/test')
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java43
1 files changed, 22 insertions, 21 deletions
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java
index 4ac5a9fdc6..75c974b2a9 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java
@@ -20,9 +20,11 @@
package org.openecomp.sdc.asdctool.migration.core.task;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult.MigrationStatus;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
public class MigrationResultTest {
@@ -32,27 +34,13 @@ public class MigrationResultTest {
@Test
- public void testGetMsg() {
- MigrationResult testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getMsg();
- }
-
-
- @Test
- public void testSetMsg() {
- MigrationResult testSubject;
- String msg = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setMsg(msg);
+ public void testMsg() {
+ MigrationResult testSubject = createTestSubject();
+ assertNull(testSubject.getMsg());
+ testSubject.setMsg("msg");
+ assertEquals("msg", testSubject.getMsg());
}
-
@Test
public void testGetMigrationStatus() {
MigrationResult testSubject;
@@ -63,7 +51,6 @@ public class MigrationResultTest {
result = testSubject.getMigrationStatus();
}
-
@Test
public void testSetMigrationStatus() {
MigrationResult testSubject;
@@ -73,4 +60,18 @@ public class MigrationResultTest {
testSubject = createTestSubject();
testSubject.setMigrationStatus(migrationStatus);
}
+
+ @Test
+ public void testSuccess() {
+ MigrationResult testSubject = createTestSubject();
+ assertEquals(MigrationResult.MigrationStatus.COMPLETED, testSubject.success().getMigrationStatus());
+ }
+
+ @Test
+ public void testError() {
+ MigrationResult testSubject = createTestSubject();
+ MigrationResult result = testSubject.error("testErr");
+ assertEquals(MigrationStatus.FAILED, result.getMigrationStatus());
+ assertEquals("testErr", result.getMsg());
+ }
}