summaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/pom.xml14
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java9
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VFToscaArtifactValidatorExecutorTest.java9
3 files changed, 24 insertions, 8 deletions
diff --git a/asdctool/pom.xml b/asdctool/pom.xml
index 015522b453..dac5063311 100644
--- a/asdctool/pom.xml
+++ b/asdctool/pom.xml
@@ -447,6 +447,20 @@
</dependency>
<dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${junitJupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-junit-jupiter</artifactId>
+ <version>${mockitoJupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java
index 6e3c15d58d..d74aaa49a2 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java
@@ -20,7 +20,8 @@
package org.openecomp.sdc.asdctool.impl.validator.executers;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
@@ -53,12 +54,12 @@ public class TopologyTemplateValidatorExecuterTest {
result = testSubject.getName();
}
- @Test(expected=NullPointerException.class)
- public void testGetVerticesToValidate() throws Exception {
+ @Test
+ public void testGetVerticesToValidate() {
TopologyTemplateValidatorExecuter testSubject;
// default test
testSubject = createTestSubject();
- testSubject.getVerticesToValidate(ComponentTypeEnum.PRODUCT);
+ Assertions.assertThrows(NullPointerException.class, () -> testSubject.getVerticesToValidate(ComponentTypeEnum.PRODUCT));
}
}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VFToscaArtifactValidatorExecutorTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VFToscaArtifactValidatorExecutorTest.java
index bf9436336d..c8edb7d05a 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VFToscaArtifactValidatorExecutorTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VFToscaArtifactValidatorExecutorTest.java
@@ -20,7 +20,8 @@
package org.openecomp.sdc.asdctool.impl.validator.executers;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
@@ -35,14 +36,14 @@ public class VFToscaArtifactValidatorExecutorTest {
return new VFToscaArtifactValidatorExecutor(janusGraphDaoMock, toscaOperationFacade);
}
- @Test(expected=NullPointerException.class)
- public void testExecuteValidations() throws Exception {
+ @Test
+ public void testExecuteValidations() {
VFToscaArtifactValidatorExecutor testSubject;
boolean result;
// default test
testSubject = createTestSubject();
- result = testSubject.executeValidations();
+ Assertions.assertThrows(NullPointerException.class, () -> testSubject.executeValidations());
}
@Test