0fedc2dc46e6e2d7fec79ee3c459523785b2688c
[usecase-ui/server.git] /
1 /**
2  * Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
3  *
4  * ================================================================================
5  *  Modifications Copyright (C) 2020 IBM.
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  */
19 package org.onap.usecaseui.server.service.lcm.domain.so.bean;
20
21 import org.junit.Test; 
22 import org.junit.Before; 
23 import org.junit.After;
24 import org.junit.runner.RunWith;
25 import org.onap.usecaseui.server.UuiServerApplication;
26 import org.onap.usecaseui.server.service.lcm.domain.so.bean.*;
27 import org.onap.usecaseui.server.util.DateUtils;
28 import org.onap.usecaseui.server.util.Page;
29 import org.springframework.beans.factory.annotation.Autowired;
30 import org.springframework.boot.test.context.SpringBootTest;
31 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
32 import org.springframework.test.context.web.WebAppConfiguration;
33
34 import java.sql.Timestamp;
35 import java.text.SimpleDateFormat;
36 import java.util.*;
37 import java.io.*;
38 import org.hibernate.Query;
39 import org.hibernate.Session;
40 import org.hibernate.SessionFactory;
41 import org.hibernate.Transaction;
42
43 import mockit.Mock;
44 import mockit.MockUp;
45
46 import static org.junit.Assert.assertEquals;
47
48 public class OperationProgressInformationTest {
49
50         @Before
51         public void before() throws Exception {
52         }
53
54         @After
55         public void after() throws Exception {
56         }
57
58         @Test
59         public void testGet() throws Exception {
60                 OperationProgressInformation opi = new OperationProgressInformation();
61                 OperationProgress op = new OperationProgress("123","test","test","test","test","test","test","test",123,"test","test");
62                 opi.setOperationStatus(op);
63                 assertEquals(op,opi.getOperationStatus());
64         }
65         @Test
66         public void testConstructor() throws Exception {
67                 OperationProgress op = new OperationProgress("123","test","test","test","test","test","test","test",123,"test","test");
68                 OperationProgressInformation opi = new OperationProgressInformation(op);
69                 assertEquals(op,opi.getOperationStatus());
70         }
71 }