diff options
author | xu ran <xuranyjy@chinamobile.com> | 2020-05-14 03:10:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-14 03:10:37 +0000 |
commit | 91a4c9b9903b861739a5df5438b96206c0507344 (patch) | |
tree | 624dd78bdd7e5881c3afad24557ca5c8553f50c8 | |
parent | 8621d4b88954ac176d96853303e12ecc33d60581 (diff) | |
parent | 0532c0fbf9b5b42c211303eb083572783d19e937 (diff) |
Merge "Junit testcase for Relationship"
-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()); + + + } |