diff options
Diffstat (limited to 'catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j')
8 files changed, 0 insertions, 416 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilderTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilderTest.java deleted file mode 100644 index 65ce29b946..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilderTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 Nokia. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.sdc.be.dao.neo4j; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation; - -public class BatchBuilderTest { - - private GraphRelation graphElement = new GraphRelation(); - - @Test - public void shouldAddAndGetElement() { - BatchBuilder builder = BatchBuilder.getBuilder(); - builder.add(graphElement); - assertEquals(graphElement, builder.getElements().get(0)); - } -}
\ No newline at end of file diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabelsTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabelsTest.java deleted file mode 100644 index 77aa66d55d..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabelsTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.be.dao.neo4j; - -import org.junit.Test; - -import java.util.List; - -public class GraphEdgeLabelsTest { - - private GraphEdgeLabels createTestSubject() { - return GraphEdgeLabels.ADDITIONAL_INFORMATION; - } - - @Test - public void testGetProperty() throws Exception { - GraphEdgeLabels testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getProperty(); - } - - @Test - public void testSetProperty() throws Exception { - GraphEdgeLabels testSubject; - String property = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setProperty(property); - } - - @Test - public void testGetAllProperties() throws Exception { - List<String> result; - - // default test - result = GraphEdgeLabels.getAllProperties(); - } - - @Test - public void testGetByName() throws Exception { - String property = ""; - GraphEdgeLabels result; - - // default test - result = GraphEdgeLabels.getByName(property); - result = GraphEdgeLabels.getByName("mock"); - } -} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionaryTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionaryTest.java deleted file mode 100644 index 3c34cc09a2..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionaryTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.be.dao.neo4j; - -import org.junit.Test; - -import java.util.List; - -public class GraphEdgePropertiesDictionaryTest { - - private GraphEdgePropertiesDictionary createTestSubject() { - return GraphEdgePropertiesDictionary.GET_INPUT_INDEX; - } - - @Test - public void testGetProperty() throws Exception { - GraphEdgePropertiesDictionary testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getProperty(); - } - - @Test - public void testSetProperty() throws Exception { - GraphEdgePropertiesDictionary testSubject; - String property = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setProperty(property); - } - - @Test - public void testGetClazz() throws Exception { - GraphEdgePropertiesDictionary testSubject; - Class result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getClazz(); - } - - @Test - public void testSetClazz() throws Exception { - GraphEdgePropertiesDictionary testSubject; - Class clazz = null; - - // default test - testSubject = createTestSubject(); - testSubject.setClazz(clazz); - } - - @Test - public void testGetAllProperties() throws Exception { - List<String> result; - - // default test - result = GraphEdgePropertiesDictionary.getAllProperties(); - } - - @Test - public void testGetByName() throws Exception { - String property = ""; - GraphEdgePropertiesDictionary result; - - // default test - result = GraphEdgePropertiesDictionary.getByName(property); - result = GraphEdgePropertiesDictionary.getByName("mock"); - } -} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphNeighbourTableTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphNeighbourTableTest.java deleted file mode 100644 index 14d3f3aeb0..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphNeighbourTableTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 Nokia. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.sdc.be.dao.neo4j; - -import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; - -import org.junit.Test; -import org.openecomp.sdc.be.resources.data.ArtifactData; - -public class GraphNeighbourTableTest { - @Test - public void shouldHaveValidGettersAndSetters() { - assertThat(GraphNeighbourTable.class, hasValidGettersAndSetters()); - } - - @Test - public void shouldAddEdge() { - GraphNeighbourTable graphNeighbourTable = new GraphNeighbourTable(); - NodeRelation directedEdge = new NodeRelation(1, 1, null); - graphNeighbourTable.addEdge(directedEdge); - assertEquals(directedEdge, graphNeighbourTable.getDirectedEdges().get(0)); - } - - @Test - public void shouldAddNode() { - GraphNeighbourTable graphNeighbourTable = new GraphNeighbourTable(); - ArtifactData node = new ArtifactData(); - int index = graphNeighbourTable.addNode(node); - assertEquals(node, graphNeighbourTable.getNodes().get(0)); - assertEquals(index, 0); - } -}
\ No newline at end of file diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryTest.java deleted file mode 100644 index b04811812a..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionaryTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.be.dao.neo4j; - -import org.junit.Test; - -public class GraphPropertiesDictionaryTest { - - private GraphPropertiesDictionary createTestSubject() { - return GraphPropertiesDictionary.ADDITIONAL_INFO_ID_TO_KEY; - } - - @Test - public void testGetProperty() throws Exception { - GraphPropertiesDictionary testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getProperty(); - } - - @Test - public void testGetClazz() throws Exception { - GraphPropertiesDictionary testSubject; - Class result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getClazz(); - } - - @Test - public void testIsUnique() throws Exception { - GraphPropertiesDictionary testSubject; - boolean result; - - // default test - testSubject = createTestSubject(); - result = testSubject.isUnique(); - } - - @Test - public void testIsIndexed() throws Exception { - GraphPropertiesDictionary testSubject; - boolean result; - - // default test - testSubject = createTestSubject(); - result = testSubject.isIndexed(); - } -} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdgeTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdgeTest.java deleted file mode 100644 index 664fed070f..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdgeTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 Nokia. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.sdc.be.dao.neo4j; - -import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; -import static org.junit.Assert.assertThat; - -import org.junit.Test; - -public class Neo4jEdgeTest { - @Test - public void shouldHaveValidGettersAndSetters() { - assertThat(Neo4jEdge.class, hasValidGettersAndSetters()); - } -}
\ No newline at end of file diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/Neo4jOperationStatusTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/Neo4jOperationStatusTest.java deleted file mode 100644 index 837cf0baee..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/Neo4jOperationStatusTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 Nokia. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.sdc.be.dao.neo4j; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class Neo4jOperationStatusTest { - - @Test - public void shouldPrintStatusInCorrectFormat() { - String status = Neo4jOperationStatus.BAD_REQUEST - .setMessage("A").setHelpErrorMsg("B").setOriginError("C").printError(); - assertEquals(status, "[BAD_REQUEST-C-B-A]"); - } -}
\ No newline at end of file diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/NodeRelationTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/NodeRelationTest.java deleted file mode 100644 index 523c519617..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/neo4j/NodeRelationTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 Nokia. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.sdc.be.dao.neo4j; - -import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; -import static org.junit.Assert.assertThat; - -import org.junit.Test; - -public class NodeRelationTest { - @Test - public void shouldHaveValidGettersAndSetters() { - assertThat(NodeRelation.class, hasValidGettersAndSetters()); - } -}
\ No newline at end of file |