From 3e6caca29ecf74b0bacdfc7f20990e9820fc987d Mon Sep 17 00:00:00 2001 From: Rodrigo Lima Date: Fri, 15 May 2020 09:37:26 -0400 Subject: Remove powermock from ReportManagerTest - Remove powermock reference from ReportManagerTest - Use Junit 5 imports instead of junit 4 Issue-ID: SDC-3066 Signed-off-by: Rodrigo Lima Change-Id: Iece6e5741d5f2f5bc5db2ec7c85c63948776d601 --- .../impl/validator/utils/ReportManagerTest.java | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'asdctool/src/test/java/org') diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java index 6be7f472aa..e87347269c 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java @@ -21,32 +21,23 @@ package org.openecomp.sdc.asdctool.impl.validator.utils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; import org.openecomp.sdc.asdctool.impl.validator.config.ValidationConfigManager; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; -import org.powermock.modules.junit4.PowerMockRunnerDelegate; import java.io.File; import java.util.Arrays; import java.util.List; -import java.util.Objects; import java.util.SortedSet; import java.util.TreeSet; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.Mockito.when; -@RunWith(PowerMockRunner.class) -@PowerMockRunnerDelegate(MockitoJUnitRunner.class) -@PrepareForTest({ReportManager.class}) public class ReportManagerTest { private static final String VERTEX_1_ID = "testID1"; @@ -79,16 +70,15 @@ public class ReportManagerTest { .csvReportFilePath(resourcePath, System::currentTimeMillis); private final static String txtReportFilePath = ValidationConfigManager.txtReportFilePath(resourcePath); - @Mock - GraphVertex vertexScanned; + private GraphVertex vertexScanned = Mockito.mock(GraphVertex.class); - @Before + @BeforeEach public void setup() { ReportManager.make(csvReportFilePath, txtReportFilePath); successResult.setStatus(true); } - @After + @AfterEach public void clean() { ReportManagerHelper.cleanReports(csvReportFilePath, txtReportFilePath); } -- cgit 1.2.3-korg