summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
diff options
context:
space:
mode:
authorSudarshan Kumar <sudars19@in.ibm.com>2019-02-01 13:13:05 +0530
committerJoss Armstrong <joss.armstrong@ericsson.com>2019-02-06 09:47:39 +0000
commit639f053e8819d76a254f20f5c0b797ee65965301 (patch)
tree7f50776c404d1f0744bed15d547243e9340cffd8 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
parent3a3d8e4ff51b849335946ec1cc06aedaa133730b (diff)
Volume - Junit Test case added
Volume - Junit Test case added Issue-ID: APPC-1372 Change-Id: I44a262819ddc3f0f3319e320ef3bf01ef8ca1e13 Signed-off-by: Sudarshan Kumar <sudars19@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/TestVolume.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java
index c70c261c4..df128d980 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java
@@ -3,7 +3,9 @@
* ONAP : APPC
* ================================================================================
* Copyright 2018 TechMahindra
-*=================================================================================
+* ================================================================================
+* Modifications Copyright (c) 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
@@ -26,22 +28,31 @@ import org.junit.Test;
public class TestVolume {
private Volume volume;
+ private Properties properties;
@Before
public void setUp() {
volume = new Volume();
+ properties = new Properties();
}
@Test
public void testGetType() {
volume.setType("A");
- assertNotNull(volume.getType());
- assertEquals(volume.getType(), "A");
+ assertEquals("A",volume.getType());
}
@Test
public void testToString_ReturnNonEmptyString() {
- assertNotEquals(volume.toString(), "");
- assertNotEquals(volume.toString(), null);
+ assertNotEquals("",volume.toString());
+ assertNotEquals(null,volume.toString());
+ }
+
+ @Test
+ public void testGetProperties() {
+ properties.setSize(2);
+ volume.setProperties(properties);
+ assertEquals(2, volume.getProperties().getSize());
+ assertSame(properties, volume.getProperties());
}
}