diff options
author | ezhil <ezhrajam@in.ibm.com> | 2020-05-13 19:45:05 +0530 |
---|---|---|
committer | ezhil <ezhrajam@in.ibm.com> | 2020-05-13 19:45:12 +0530 |
commit | 0532c0fbf9b5b42c211303eb083572783d19e937 (patch) | |
tree | d1f4ffc0a88bdc5c20fedd50635005b5b3b42272 | |
parent | 6226caf98a481b7a4e51ba066b96ed81b96dd071 (diff) |
Junit testcase for Relationship
Issue-ID: USECASEUI-439
Change-Id: I5b4c28e50566c9dfe2a2fd14646564232b4ac3ed
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
-rw-r--r-- | server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipTest.java | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipTest.java index 85847020..ccd235db 100644 --- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipTest.java +++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipTest.java @@ -1,6 +1,9 @@ /** * Copyright (C) 2020 Huawei, Inc. and others. All rights reserved. * + * ================================================================================ + * Modifications Copyright (C) 2020 IBM. + * ================================================================================ * 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 @@ -20,6 +23,9 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + public class RelationshipTest { @Before @@ -34,16 +40,22 @@ public class RelationshipTest { public void relationshiptest() throws Exception { Relationship relationship = new Relationship(); - - relationship.getRelatedLink(); - relationship.getRelatedTo(); - relationship.getRelationshipData(); - relationship.getRelationshipLabel(); - + RelationshipData relationshipData = new RelationshipData(); + relationshipData.setRelationshipKey("123"); + relationshipData.setRelationshipValue("123"); + RelationshipData[] rd=new RelationshipData[]{relationshipData}; + relationship.setRelationshipData(rd); relationship.setRelatedLink("123"); relationship.setRelatedTo("123"); relationship.setRelationshipLabel("123"); + assertEquals("123",relationship.getRelatedLink()); + assertEquals("123",relationship.getRelatedTo()); + assertNotNull(relationship.getRelationshipData()); + assertEquals("123",relationship.getRelationshipLabel()); + + + } |