diff options
Diffstat (limited to 'src/test/java/org/onap/dcae/inventory/dbthings/models/DCAEServiceComponentObjectTests.java')
-rw-r--r-- | src/test/java/org/onap/dcae/inventory/dbthings/models/DCAEServiceComponentObjectTests.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/java/org/onap/dcae/inventory/dbthings/models/DCAEServiceComponentObjectTests.java b/src/test/java/org/onap/dcae/inventory/dbthings/models/DCAEServiceComponentObjectTests.java index 1d80059..b4fe644 100644 --- a/src/test/java/org/onap/dcae/inventory/dbthings/models/DCAEServiceComponentObjectTests.java +++ b/src/test/java/org/onap/dcae/inventory/dbthings/models/DCAEServiceComponentObjectTests.java @@ -23,6 +23,7 @@ package org.onap.dcae.inventory.dbthings.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -69,4 +70,16 @@ public class DCAEServiceComponentObjectTests { assertNotSame(objectUpdated.getModified(), objectFirst.getModified()); } + @Test + public void testToString() { + DCAEServiceComponentRequest request = (new DCAEServiceComponentRequest()).componentId("some-component-id") + .componentType("scary-component-type"); + request.setComponentSource("controller"); + request.setShareable(0); + + DCAEServiceComponentObject object = new DCAEServiceComponentObject(request); + String stringObject = object.toString(); + assertTrue(stringObject.contains("componentId")); + } + } |