From d535447594e5812ed7e038f944741b0b38fe73b6 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 1 Feb 2019 13:15:16 +0530 Subject: added test case to TestSnapShot.java to increase code coverage Issue-ID: APPC-1086 Change-Id: Iecc9f217c7f230311daf14ba49e3106ce31d017a Signed-off-by: Sandeep J --- .../appc/adapter/openstack/heat/model/TestSnapshot.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle') 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()); } } -- cgit 1.2.3-korg