* 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
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());
}
}