- private static Logger logger = FlexLogger.getLogger(StdPDPGroupTest.class);
-
- private StdPDPGroup stdPDPGroup;
- private Path repository;
- private StdPDP testPdp = new StdPDP();
- private StdPDP testPdp1 = new StdPDP();
-
- @Before
- public void setUp(){
-
- try {
- stdPDPGroup = new StdPDPGroup();
- repository = Paths.get("src/test/resources/pdps");
- testPdp1.setId("100");
-
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
-
- @Test
- public void testGetStatus() {
- try {
- assertTrue(stdPDPGroup.getStatus() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetId() {
- try {
- stdPDPGroup.setId("testId");
- assertTrue(stdPDPGroup.getId() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testIsDefaultGroup() {
- try {
- stdPDPGroup.setDefaultGroup(true);
- assertTrue(stdPDPGroup.isDefaultGroup() == true);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetName() {
- try {
- stdPDPGroup.setName("testing");
- assertTrue(stdPDPGroup.getName() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetDescription() {
- try {
- stdPDPGroup.setDescription("description");
- assertTrue(stdPDPGroup.getDescription() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetDirectory() {
- try {
- stdPDPGroup.setDirectory(repository);
- assertTrue(stdPDPGroup.getDirectory() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetSelectedPolicies() {
- try {
- assertTrue(stdPDPGroup.getSelectedPolicies() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetOperation() {
- try {
- stdPDPGroup.setOperation("test");
- assertTrue(stdPDPGroup.getOperation() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetPdps() {
- try {
- stdPDPGroup.setOnapPdps(new HashSet<>());
- assertTrue(stdPDPGroup.getPdps() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetOnapPdps() {
- try {
- stdPDPGroup.setOnapPdps(new HashSet<>());
- assertTrue(stdPDPGroup.getOnapPdps() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testAddPDP() {
- try {
- assertTrue(stdPDPGroup.addPDP(testPdp) == true);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testRemovePDP() {
- try {
- assertTrue(stdPDPGroup.removePDP(testPdp) == false);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetPolicies() {
- try {
- stdPDPGroup.setPolicies(new HashSet());
- assertTrue(stdPDPGroup.getPolicies() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetPolicy() {
- try {
- assertTrue(stdPDPGroup.getPolicy("wrongId") == null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
-
- @Test
- public void testGetPipConfigs() {
- try {
- stdPDPGroup.setPipConfigs(new HashSet());
- assertTrue(stdPDPGroup.getPipConfigs() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetPipConfig() {
- try {
- Set pipConfigs = new HashSet();
- StdPDP testPdp = new StdPDP();
- testPdp.setId("20");
- pipConfigs.add(testPdp);
- stdPDPGroup.setId("testId");
- assertTrue(stdPDPGroup.getPipConfig("222") == null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
- @Test
- public void testGetPipConfigProperties() {
- try {
- assertTrue(stdPDPGroup.getPipConfigProperties() != null);
- } catch (Exception e) {
- logger.error(e);
- }
- }
-
+ private static Logger logger = FlexLogger.getLogger(StdPDPGroupTest.class);
+
+ private StdPDPGroup stdPDPGroup;
+ private Path repository;
+ private StdPDP testPdp = new StdPDP();
+ private StdPDP testPdp1 = new StdPDP();
+
+ @Before
+ public void setUp() {
+
+ try {
+ stdPDPGroup = new StdPDPGroup();
+ repository = Paths.get("src/test/resources/pdps");
+ testPdp1.setId("100");
+
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetStatus() {
+ try {
+ assertTrue(stdPDPGroup.getStatus() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetId() {
+ try {
+ stdPDPGroup.setId("testId");
+ assertTrue(stdPDPGroup.getId() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testIsDefaultGroup() {
+ try {
+ stdPDPGroup.setDefaultGroup(true);
+ assertTrue(stdPDPGroup.isDefaultGroup() == true);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetName() {
+ try {
+ stdPDPGroup.setName("testing");
+ assertTrue(stdPDPGroup.getName() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetDescription() {
+ try {
+ stdPDPGroup.setDescription("description");
+ assertTrue(stdPDPGroup.getDescription() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetDirectory() {
+ try {
+ stdPDPGroup.setDirectory(repository);
+ assertTrue(stdPDPGroup.getDirectory() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetSelectedPolicies() {
+ try {
+ assertTrue(stdPDPGroup.getSelectedPolicies() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetOperation() {
+ try {
+ stdPDPGroup.setOperation("test");
+ assertTrue(stdPDPGroup.getOperation() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetPdps() {
+ try {
+ stdPDPGroup.setOnapPdps(new HashSet<>());
+ assertTrue(stdPDPGroup.getPdps() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetOnapPdps() {
+ try {
+ stdPDPGroup.setOnapPdps(new HashSet<>());
+ assertTrue(stdPDPGroup.getOnapPdps() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testAddPDP() {
+ try {
+ assertTrue(stdPDPGroup.addPDP(testPdp) == true);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testRemovePDP() {
+ try {
+ assertTrue(stdPDPGroup.removePDP(testPdp) == false);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetPolicies() {
+ try {
+ stdPDPGroup.setPolicies(new HashSet());
+ assertTrue(stdPDPGroup.getPolicies() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetPolicy() {
+ try {
+ assertTrue(stdPDPGroup.getPolicy("wrongId") == null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetPipConfigs() {
+ try {
+ stdPDPGroup.setPipConfigs(new HashSet());
+ assertTrue(stdPDPGroup.getPipConfigs() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetPipConfig() {
+ try {
+ Set pipConfigs = new HashSet();
+ StdPDP testPdp = new StdPDP();
+ testPdp.setId("20");
+ pipConfigs.add(testPdp);
+ stdPDPGroup.setId("testId");
+ assertTrue(stdPDPGroup.getPipConfig("222") == null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }
+
+ @Test
+ public void testGetPipConfigProperties() {
+ try {
+ assertTrue(stdPDPGroup.getPipConfigProperties() != null);
+ } catch (Exception e) {
+ logger.error(e);
+ }
+ }