aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipTest.java24
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());
+
+
+
}