summaryrefslogtreecommitdiffstats
path: root/asdctool/src/test
diff options
context:
space:
mode:
authorRodrigo Lima <rodrigo.lima@yoppworks.com>2020-05-15 09:37:26 -0400
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-05-17 07:30:37 +0000
commit3e6caca29ecf74b0bacdfc7f20990e9820fc987d (patch)
tree6708bc0a1af1fdcd6c00a1fea75d02b3acf37658 /asdctool/src/test
parentbcf6a1c5302625ea034067cab8c3489746f733bd (diff)
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 <rodrigo.lima@yoppworks.com> Change-Id: Iece6e5741d5f2f5bc5db2ec7c85c63948776d601
Diffstat (limited to 'asdctool/src/test')
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManagerTest.java28
1 files changed, 9 insertions, 19 deletions
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);
}