diff options
author | Sudarshan Kumar <sudars19@in.ibm.com> | 2019-02-01 13:29:51 +0530 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-02-05 18:08:40 +0000 |
commit | b23f8d7f714710ddf65f74654522ad5bae67964e (patch) | |
tree | dbf11a850123846a2d3da6b57f61137380106fe3 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle | |
parent | 6bcb029d5f4110fd3e07ccb6a662c3712ef748fb (diff) |
Volume_ - Junit Test case added
Volume_ - Junit Test case added
Issue-ID: APPC-1372
Change-Id: Ie35baff6161aaeecd25e2055ef40f3a6d5b0000b
Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle')
-rw-r--r-- | appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume_.java | 34 |
1 files changed, 25 insertions, 9 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 f20cea445..74a32064c 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 @@ -4,6 +4,8 @@ * ================================================================================ * 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,50 +28,64 @@ import org.junit.Test; public class TestVolume_ { private Volume_ volume_; + private Metadata metadata; + private ResourceData resourceData; @Before public void setUp() { volume_ = new Volume_(); + metadata = new Metadata(); + resourceData = new ResourceData(); } @Test public void testGetStatus() { volume_.setStatus("Success"); - assertNotNull(volume_.getStatus()); - assertEquals(volume_.getStatus(), "Success"); + assertEquals("Success",volume_.getStatus()); } @Test public void testGetName() { volume_.setName("XYZ"); assertNotNull(volume_.getName()); - assertEquals(volume_.getName(), "XYZ"); + assertEquals("XYZ",volume_.getName()); } @Test public void testGetResourceId() { volume_.setResourceId("333"); assertNotNull(volume_.getResourceId()); - assertEquals(volume_.getResourceId(), "333"); + assertEquals("333",volume_.getResourceId()); } @Test public void testGetAction() { volume_.setAction("action"); assertNotNull(volume_.getAction()); - assertEquals(volume_.getAction(), "action"); + assertEquals("action",volume_.getAction()); } @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 testGetResourceData() { + volume_.setResourceData(resourceData); + assertSame(resourceData,volume_.getResourceData()); + } + + @Test + public void testGetMetadata() { + volume_.setMetadata(metadata); + assertSame(metadata,volume_.getMetadata()); } } |