summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-02-01 13:15:16 +0530
committerJoss Armstrong <joss.armstrong@ericsson.com>2019-02-05 13:43:09 +0000
commitd535447594e5812ed7e038f944741b0b38fe73b6 (patch)
tree8a5f21473d34b64a05e7858810b4fe09f56c21c2 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
parentbfca2d3ea6aa9e9a332691b0cf623d8b1e6c0268 (diff)
added test case to TestSnapShot.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Iecc9f217c7f230311daf14ba49e3106ce31d017a Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java
index 1adc63e87..4a78a36ce 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright 2018 TechMahindra
*=================================================================================
+* Modifications Copyright 2019 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
@@ -63,13 +65,19 @@ public class TestSnapshot {
@Test
public void testGetCreationTime() {
snapshot.setCreationTime("01-March-2018");
- assertNotNull(snapshot.getCreationTime());
- assertEquals(snapshot.getCreationTime(), "01-March-2018");
+ assertEquals("01-March-2018",snapshot.getCreationTime());
}
@Test
public void testToString_ReturnNonEmptyString() {
- assertNotEquals(snapshot.toString(), "");
- assertNotEquals(snapshot.toString(), null);
+ assertNotEquals("",snapshot.toString());
+ assertNotEquals(null,snapshot.toString());
+ }
+
+ @Test
+ public void testData() {
+ Data data = new Data();
+ snapshot.setData(data);
+ assertSame(data, snapshot.getData());
}
}