From 3e8793276f623132892331cf65c85bb91c1ab154 Mon Sep 17 00:00:00 2001 From: "Baumel, Dvir (db384r)" Date: Mon, 23 Mar 2020 16:21:05 +0200 Subject: Upgrade Junit to version 5.6 Issue-ID: SDC-2844 Change-Id: I4716bf7920f9bb79c450ebfd48e9d4fba54fdfdd Signed-off-by: Baumel, Dvir (db384r) --- .../executers/TopologyTemplateValidatorExecuterTest.java | 9 +++++---- .../executers/VFToscaArtifactValidatorExecutorTest.java | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'asdctool/src/test/java/org') 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 -- cgit 1.2.3-korg