aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java')
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java
index c0ae55a607..b6ab4f5b55 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java
@@ -6,9 +6,9 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
-import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
+import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyMap;
@@ -18,14 +18,14 @@ import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class VrfObjectFixHandlerTest {
- private TitanDao titanDao;
+ private JanusGraphDao janusGraphDao;
private VrfObjectFixHandler vrfObjectFixHandler;
@Before
public void init(){
- titanDao = Mockito.mock(TitanDao.class);
- vrfObjectFixHandler = new VrfObjectFixHandler(titanDao);
+ janusGraphDao = Mockito.mock(JanusGraphDao.class);
+ vrfObjectFixHandler = new VrfObjectFixHandler(janusGraphDao);
}
@Test
@@ -35,25 +35,29 @@ public class VrfObjectFixHandlerTest {
@Test
public void handleDetectNotFoundTest(){
- when(titanDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(TitanOperationStatus.NOT_FOUND));
+ when(janusGraphDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(
+ JanusGraphOperationStatus.NOT_FOUND));
assertThat(vrfObjectFixHandler.handle("detect", null)).isTrue();
}
@Test
- public void handleDetectTitanNotConnectedTest(){
- when(titanDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(TitanOperationStatus.NOT_CONNECTED));
+ public void handleDetectJanusGraphNotConnectedTest(){
+ when(janusGraphDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(
+ JanusGraphOperationStatus.NOT_CONNECTED));
assertThat(vrfObjectFixHandler.handle("detect", null)).isFalse();
}
@Test
public void handleFixNotFoundTest(){
- when(titanDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(TitanOperationStatus.NOT_FOUND));
+ when(janusGraphDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(
+ JanusGraphOperationStatus.NOT_FOUND));
assertThat(vrfObjectFixHandler.handle("fix", null)).isTrue();
}
@Test
public void handleFixNotCreatedTest(){
- when(titanDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(TitanOperationStatus.NOT_CREATED));
+ when(janusGraphDao.getByCriteria(eq(VertexTypeEnum.NODE_TYPE), anyMap())).thenReturn(Either.right(
+ JanusGraphOperationStatus.NOT_CREATED));
assertThat(vrfObjectFixHandler.handle("fix", null)).isFalse();
}