X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Fclamp%2Fclds%2Ftosca%2FDictionaryRepositoriesTestItCase.java;h=5208f7ffd2474850f2c6d85021c0eb7043804214;hb=3a83e2a2ff88ef49535973df8dc77dc8015170da;hp=2274fcf638b14ba50ce7a4195c0958f8a60c69fd;hpb=29e3cd1afbd3202a0c16ef6a4057662942ddefa2;p=clamp.git diff --git a/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java b/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java index 2274fcf6..5208f7ff 100644 --- a/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java +++ b/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java @@ -25,9 +25,7 @@ package org.onap.clamp.clds.tosca; import static org.assertj.core.api.Assertions.assertThat; -import java.util.LinkedList; import java.util.List; - import org.junit.Test; import org.junit.runner.RunWith; import org.onap.clamp.clds.Application; @@ -55,16 +53,12 @@ public class DictionaryRepositoriesTestItCase { dictionaryTest1.setSubDictionaryType("testType"); DictionaryElement element1 = new DictionaryElement(); - element1.setDictionary(dictionaryTest1); element1.setName("element1"); element1.setShortName("shortName1"); - element1.setSubDictionary("subDictionary1"); element1.setType("type1"); element1.setDescription("description1"); - LinkedList elementList1 = new LinkedList(); - elementList1.add(element1); - dictionaryTest1.setDictionaryElements(elementList1); + dictionaryTest1.addDictionaryElements(element1); Dictionary dictionaryTest2 = new Dictionary(); dictionaryTest2.setName("testDictionary2"); @@ -72,16 +66,13 @@ public class DictionaryRepositoriesTestItCase { dictionaryTest2.setSubDictionaryType("testType"); DictionaryElement element2 = new DictionaryElement(); - element2.setDictionary(dictionaryTest2); element2.setName("element2"); element2.setShortName("shortName2"); - element2.setSubDictionary("subDictionary2"); + element2.setSubDictionary("testDictionary1"); element2.setType("type2"); element2.setDescription("description2"); - LinkedList elementList2 = new LinkedList(); - elementList2.add(element2); - dictionaryTest2.setDictionaryElements(elementList2); + dictionaryTest2.addDictionaryElements(element2); dictionaryRepository.save(dictionaryTest1); List res1 = dictionaryRepository.getAllDictionaryNames();