Merge "Reorder modifiers"
[so.git] / mso-api-handlers / mso-requests-db / src / test / java / org / openecomp / mso / requestsdb / WatchdogServiceModVerIdLookupTest.java
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : SO
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *     http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20
21 package org.openecomp.mso.requestsdb;
22
23 import static org.junit.Assert.assertEquals;
24 import java.sql.Timestamp;
25 import org.junit.Test;
26
27 public class WatchdogServiceModVerIdLookupTest {
28     
29     WatchdogServiceModVerIdLookup wsmil=new WatchdogServiceModVerIdLookup();
30     Timestamp time=new Timestamp(10);
31     @Test
32     public void test(){
33         wsmil.setCreateTime(time);
34         wsmil.setDistributionId("distributionId");
35         wsmil.setServiceModelVersionId("serviceModelVersionId");
36         
37         assertEquals(wsmil.getCreateTime(),time);
38         assertEquals(wsmil.getDistributionId(), "distributionId");
39         assertEquals(wsmil.getServiceModelVersionId(), "serviceModelVersionId");
40     }
41 }
42 /*WatchdogServiceModVerIdLookup _watchdogServiceModVerIdLookup;
43         
44         protected String _distributionId;
45         protected String _serviceModelVersionId;
46         protected Timestamp _createTime;
47         
48         public WatchdogServiceModVerIdLookupTest() {
49         }
50         
51     @Before
52         public void setUp() {
53         _watchdogServiceModVerIdLookup = mock(WatchdogServiceModVerIdLookup.class);
54         _serviceModelVersionId = "12abad84e7ff";
55         _createTime = new Timestamp (System.currentTimeMillis());
56         
57         when(_watchdogServiceModVerIdLookup.getDistributionId()).thenReturn(_distributionId);
58         when(_watchdogServiceModVerIdLookup.getServiceModelVersionId()).thenReturn(_serviceModelVersionId);
59         when(_watchdogServiceModVerIdLookup.getCreateTime()).thenReturn(_createTime);
60         }
61     
62         @After
63         public void tearDown() {
64                 _watchdogServiceModVerIdLookup = null;
65         }
66         
67         *//**
68          * Test of getDistributionId method
69          *//*
70         @Test
71         public void testGetDistributionId() {
72                 _watchdogServiceModVerIdLookup.setDistributionId(_distributionId);
73                 assertEquals(_watchdogServiceModVerIdLookup.getDistributionId(),_distributionId);
74
75         }
76
77         *//**
78          * Test setDistributionId  method
79          *//*
80         @Test
81         public void testSetDistributionId() {
82                 _watchdogServiceModVerIdLookup.setDistributionId(_distributionId);
83                 verify(_watchdogServiceModVerIdLookup).setDistributionId(_distributionId);
84         }
85         
86         *//**
87          * Test of getServiceModelVersionId method
88          *//*
89         @Test
90         public void testGetServiceModelVersionId() {
91                 _watchdogServiceModVerIdLookup.setServiceModelVersionId(_serviceModelVersionId);
92                 assertEquals(_watchdogServiceModVerIdLookup.getServiceModelVersionId(),_serviceModelVersionId);
93
94         }
95
96         *//**
97          * Test setServiceModelVersionId  method
98          *//*
99         @Test
100         public void testSetServiceModelVersionId() {
101                 _watchdogServiceModVerIdLookup.setServiceModelVersionId(_serviceModelVersionId);
102                 verify(_watchdogServiceModVerIdLookup).setServiceModelVersionId(_serviceModelVersionId);
103         }
104         
105         *//**
106          * Test of getCreateTime method
107          *//*
108         @Test
109         public void testGetCreateTime() {
110                 _watchdogServiceModVerIdLookup.setCreateTime(_createTime);
111                 assertEquals(_watchdogServiceModVerIdLookup.getCreateTime(),_createTime);
112
113         }
114
115         *//**
116          * Test setCreateTime method
117          *//*
118         @Test
119         public void testSetCreateTime() {
120                 _watchdogServiceModVerIdLookup.setCreateTime(_createTime);
121                 verify(_watchdogServiceModVerIdLookup).setCreateTime(_createTime);
122         }
123         
124 }*/