summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxu ran <xuranyjy@chinamobile.com>2020-05-07 06:33:52 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-07 06:33:52 +0000
commitb25f4432be029c16f41e16ba87c75e0b7cbd0478 (patch)
tree2b46e1ee26a3a041f1badf3506a46e22aaa786ea
parentb7187737302fd19dd6f250bfd69b570adf82707a (diff)
parent4781f3e75a2dcc2b23f0c77c4f52fdb5b2f0cdf8 (diff)
Merge "Junit for RelationshipList"
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipListTest.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipListTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipListTest.java
index 48a47a38..fe4ad627 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipListTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipListTest.java
@@ -2,6 +2,9 @@ package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
import org.junit.After;
import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
/**
* Copyright (C) 2020 Huawei, Inc. and others. All rights reserved.
@@ -28,11 +31,26 @@ public class RelationshipListTest {
public void after() throws Exception {
}
+ @Test
public void relationshipListTest() throws Exception
{
RelationshipList relationshipList = new RelationshipList();
+ Relationship relationship = new Relationship();
+ RelationshipData relationshipData = new RelationshipData();
+
+ relationshipData.setRelationshipKey("123");
+ relationshipData.setRelationshipValue("123");
+
+ relationship.setRelatedLink("123");
+ relationship.setRelatedTo("123");
+ relationship.setRelationshipLabel("123");
+
+ RelationshipData[] rd=new RelationshipData[]{relationshipData};
+ relationship.setRelationshipData(rd);
- relationshipList.getRelationship();
+ Relationship[] rslist=new Relationship[]{relationship};
+ relationshipList.setRelationship(rslist);
+ assertNotNull(relationshipList.getRelationship());
}