diff options
author | 2018-08-28 15:59:03 -0400 | |
---|---|---|
committer | 2018-08-28 15:59:39 -0400 | |
commit | 54dec15de7897cc737c2daa5c8f904483215ef2e (patch) | |
tree | c650537a4bb00d1c7c357ba3a2df0d4097b71912 /src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java | |
parent | d26f38d193e2cee5b502c7418f282dc69a029a3c (diff) |
Adding Network and VM
Issue-ID: LOG-614
Change-Id: I00b2f38ed0db1e1d8886732c1bbfd775704b60a4
Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java')
-rw-r--r-- | src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java b/src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java index 85dbfc7..ee04a08 100644 --- a/src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java +++ b/src/test/java/org/onap/pomba/common/datatypes/ModelContextTests.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.List;
import org.junit.Test;
+import org.onap.pomba.common.datatypes.Attribute.Name;
import org.onap.pomba.common.datatypes.DataQuality.Status;
public class ModelContextTests {
@@ -38,12 +39,12 @@ public class ModelContextTests { assertTrue("ModelContext data quality status doesn't match", modelContext.getDataQuality().getStatus().equals(Status.error));
assertTrue("ModelContext data quality error text doesn't match", modelContext.getDataQuality().getErrorText().equals("Test"));
Attribute attribute = new Attribute();
- attribute.setName("Attribute");
+ attribute.setName(Name.hostName);
modelContext.addAttribute(attribute);
- assertTrue("ModelContext attribute name doesn't match", modelContext.getAttribute().get(0).getName().equals("Attribute"));
- List<Attribute> attributeList = modelContext.getAttribute();
- modelContext.setAttribute(attributeList);
- assertEquals(modelContext.getAttribute().size(), 1);
+ assertTrue("ModelContext attribute name doesn't match", modelContext.getAttributes().get(0).getName().equals(Name.hostName));
+ List<Attribute> attributeList = modelContext.getAttributes();
+ modelContext.setAttributes(attributeList);
+ assertEquals(modelContext.getAttributes().size(), 1);
}
@Test
@@ -63,8 +64,8 @@ public class ModelContextTests { VF aVF = new VF();
aVF.setName("VF name");
vfList.add(aVF);
- modelContext.setVf(vfList);
- assertEquals(modelContext.getVf().size(), 1);
+ modelContext.setVfs(vfList);
+ assertEquals(modelContext.getVfs().size(), 1);
}
@Test
@@ -73,8 +74,8 @@ public class ModelContextTests { VF aVF = new VF();
aVF.setName("VF name");
modelContext.addVf(aVF);
- assertEquals(modelContext.getVf().size(), 1);
- assertTrue("ModelContext VF name doesn't match", modelContext.getVf().get(0).getName().equals("VF name"));
+ assertEquals(modelContext.getVfs().size(), 1);
+ assertTrue("ModelContext VF name doesn't match", modelContext.getVfs().get(0).getName().equals("VF name"));
}
}
|