summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2023-01-11 19:19:05 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-01-17 10:44:23 +0000
commit035ad742f60bdb375ee4e2da4345d404949a19b4 (patch)
tree7d40e43a0d6422036403cf1f0d3bbfd3248fa61a /catalog-dao/src/test/java
parentc29a4519545ff509c038c9a19781ef210b2ee14f (diff)
Improve test coverage
- extract duplicated code - remove redundant and unused code Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I7ae3592951f53bbebf10a80f7cce22d54b2940b6 Issue-ID: SDC-4317
Diffstat (limited to 'catalog-dao/src/test/java')
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java12
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java15
2 files changed, 12 insertions, 15 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java
index 7a0152df60..c896db6a45 100644
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java
@@ -82,7 +82,7 @@ class JanusGraphDaoMockTest extends DAOConfDependentTest {
// default test
- result = testSubject.getGraph();
+ result = testSubject.getJanusGraphClient().getGraph();
}
@Test
@@ -268,7 +268,7 @@ class JanusGraphDaoMockTest extends DAOConfDependentTest {
Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
// default test
- result = testSubject.getCatalogOrArchiveVerticies(true);
+ result = testSubject.getCatalogOrArchiveVertices(true);
}
@Test
@@ -300,7 +300,7 @@ class JanusGraphDaoMockTest extends DAOConfDependentTest {
Mockito.when(janusGraphClient.getGraph()).thenReturn(value);
// default test
- result = testSubject.getChildVertex(parentVertex, edgeLabel, parseFlag);
+ result = testSubject.getChildVertex(parentVertex, edgeLabel);
}
@Test
@@ -313,7 +313,7 @@ class JanusGraphDaoMockTest extends DAOConfDependentTest {
// default test
- result = testSubject.getParentVertex(parentVertex, edgeLabel, parseFlag);
+ result = testSubject.getParentVertex(parentVertex, edgeLabel);
}
@Test
@@ -326,7 +326,7 @@ class JanusGraphDaoMockTest extends DAOConfDependentTest {
// default test
- result = testSubject.getParentVertices(parentVertex, edgeLabel, parseFlag);
+ result = testSubject.getParentVertices(parentVertex, edgeLabel);
}
@Test
@@ -339,7 +339,7 @@ class JanusGraphDaoMockTest extends DAOConfDependentTest {
// default test
- result = testSubject.getChildrenVertices(parentVertex, edgeLabel, parseFlag);
+ result = testSubject.getChildrenVertices(parentVertex, edgeLabel);
}
@Test
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java
index fae514a2df..9faee6c390 100644
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java
@@ -41,22 +41,19 @@ import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
import org.openecomp.sdc.be.utils.DAOConfDependentTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
class JanusGraphDaoTest extends DAOConfDependentTest {
- private static final Logger logger = LoggerFactory.getLogger(JanusGraphDaoTest.class);
private final JanusGraphDao dao = new JanusGraphDao(new JanusGraphClient(new DAOJanusGraphStrategy()));
@BeforeEach
void init() {
- dao.janusGraphClient.createGraph();
+ dao.getJanusGraphClient().createGraph();
}
@AfterEach
void end() {
- dao.janusGraphClient.cleanupGraph();
+ dao.getJanusGraphClient().cleanupGraph();
}
@Test
@@ -106,7 +103,7 @@ class JanusGraphDaoTest extends DAOConfDependentTest {
// default test
- result = dao.getGraph();
+ result = dao.getJanusGraphClient().getGraph();
}
@Test
@@ -237,7 +234,7 @@ class JanusGraphDaoTest extends DAOConfDependentTest {
// default test
- result = dao.getCatalogOrArchiveVerticies(true);
+ result = dao.getCatalogOrArchiveVertices(true);
}
@Test
@@ -250,7 +247,7 @@ class JanusGraphDaoTest extends DAOConfDependentTest {
// default test
- result = dao.getParentVertices(parentVertex, edgeLabel, parseFlag);
+ result = dao.getParentVertices(parentVertex, edgeLabel);
}
@Test
@@ -263,7 +260,7 @@ class JanusGraphDaoTest extends DAOConfDependentTest {
// default test
- result = dao.getChildrenVertices(parentVertex, edgeLabel, parseFlag);
+ result = dao.getChildrenVertices(parentVertex, edgeLabel);
}
@Test