diff options
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/WatchdogComponentDistributionStatusTest.java')
-rw-r--r-- | mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/WatchdogComponentDistributionStatusTest.java | 177 |
1 files changed, 0 insertions, 177 deletions
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/WatchdogComponentDistributionStatusTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/WatchdogComponentDistributionStatusTest.java deleted file mode 100644 index 0d68c12a0a..0000000000 --- a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/WatchdogComponentDistributionStatusTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* -* ============LICENSE_START======================================================= -* ONAP : SO -* ================================================================================ -* Copyright 2018 TechMahindra -*================================================================================= -* 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 -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* ============LICENSE_END========================================================= -*/ -package org.openecomp.mso.requestsdb; - -import static org.junit.Assert.assertEquals; -import java.sql.Timestamp; -import org.junit.Test; - -public class WatchdogComponentDistributionStatusTest { - - WatchdogComponentDistributionStatus wcds=new WatchdogComponentDistributionStatus(); - Timestamp time=new Timestamp(10); - - @Test - public void test(){ - wcds.setComponentDistributionStatus("componentDistributionStatus"); - wcds.setComponentName("componentName"); - wcds.setCreateTime(time); - wcds.setDistributionId("distributionId"); - wcds.setModifyTime(time); - - assertEquals(wcds.getComponentDistributionStatus(), "componentDistributionStatus"); - assertEquals(wcds.getComponentName(), "componentName"); - assertEquals(wcds.getCreateTime(), time); - assertEquals(wcds.getDistributionId(), "distributionId"); - assertEquals(wcds.getModifyTime(), time); - } -} - - /*WatchdogComponentDistributionStatus _watchdogComponentDistributionStatus; - - protected String _distributionId; - protected String _componentName; - protected String _componentDistributionStatus; - protected Timestamp _createTime; - protected Timestamp _modifyTime; - - public WatchdogComponentDistributionStatusTest() { - } - - @Before - public void setUp() { - _watchdogComponentDistributionStatus = mock(WatchdogComponentDistributionStatus.class); - _distributionId = "12abad84e7ff"; - _componentName = "MSO"; - _componentDistributionStatus = "SENT"; - _createTime = new Timestamp (System.currentTimeMillis()); - _modifyTime = new Timestamp (System.currentTimeMillis()); - - when(_watchdogComponentDistributionStatus.getDistributionId()).thenReturn(_distributionId); - when(_watchdogComponentDistributionStatus.getComponentName()).thenReturn(_componentName); - when(_watchdogComponentDistributionStatus.getComponentDistributionStatus()).thenReturn(_componentDistributionStatus); - when(_watchdogComponentDistributionStatus.getCreateTime()).thenReturn(_createTime); - when(_watchdogComponentDistributionStatus.getModifyTime()).thenReturn(_modifyTime); - } - - @After - public void tearDown() { - _watchdogComponentDistributionStatus = null; - } - - *//** - * Test of getDistributionId method - *//* - @Test - public void testGetDistributionId() { - _watchdogComponentDistributionStatus.setDistributionId(_distributionId); - assertEquals(_watchdogComponentDistributionStatus.getDistributionId(),_distributionId); - - } - - *//** - * Test setDistributionId method - *//* - @Test - public void testSetDistributionId() { - _watchdogComponentDistributionStatus.setDistributionId(_distributionId); - verify(_watchdogComponentDistributionStatus).setDistributionId(_distributionId); - } - - *//** - * Test of getDistributionId method - *//* - @Test - public void testGetComponentName() { - _watchdogComponentDistributionStatus.setComponentName(_componentName); - assertEquals(_watchdogComponentDistributionStatus.getComponentName(),_componentName); - - } - - *//** - * Test setDistributionId method - *//* - @Test - public void testSetComponentName() { - _watchdogComponentDistributionStatus.setComponentName(_componentName); - verify(_watchdogComponentDistributionStatus).setComponentName(_componentName); - } - - *//** - * Test of getDistributionId method - *//* - @Test - public void testGetComponentDistributionStatus() { - _watchdogComponentDistributionStatus.setComponentDistributionStatus(_componentDistributionStatus); - assertEquals(_watchdogComponentDistributionStatus.getComponentDistributionStatus(),_componentDistributionStatus); - - } - - *//** - * Test setDistributionId method - *//* - @Test - public void testSetComponentDistributionStatus() { - _watchdogComponentDistributionStatus.setComponentDistributionStatus(_componentDistributionStatus); - verify(_watchdogComponentDistributionStatus).setComponentDistributionStatus(_componentDistributionStatus); - } - - *//** - * Test of getCreateTime method - *//* - @Test - public void testGetCreateTime() { - _watchdogComponentDistributionStatus.setCreateTime(_createTime); - System.out.println("CreateTime : " + _createTime); - assertEquals(_watchdogComponentDistributionStatus.getCreateTime(),_createTime); - - } - - *//** - * Test setCreateTime method - *//* - @Test - public void testSetCreateTime() { - _watchdogComponentDistributionStatus.setCreateTime(_createTime); - verify(_watchdogComponentDistributionStatus).setCreateTime(_createTime); - } - - *//** - * Test of getModifyTime method - *//* - @Test - public void testGetModifyTime() { - _watchdogComponentDistributionStatus.setModifyTime(_modifyTime); - System.out.println("ModifyTime : " + _modifyTime); - assertEquals(_watchdogComponentDistributionStatus.getModifyTime(),_modifyTime); - - } - - *//** - * Test setModifyTime method - *//* - @Test - public void testSetModifyTime() { - _watchdogComponentDistributionStatus.setModifyTime(_modifyTime); - verify(_watchdogComponentDistributionStatus).setModifyTime(_modifyTime); - } - -} -*/
\ No newline at end of file |