2 * Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 package org.onap.usecaseui.server.service.lcm.domain.so.bean;
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;
34 import java.sql.Timestamp;
35 import java.text.SimpleDateFormat;
38 import org.hibernate.Query;
39 import org.hibernate.Session;
40 import org.hibernate.SessionFactory;
41 import org.hibernate.Transaction;
46 import static org.junit.Assert.assertEquals;
48 public class OperationProgressInformationTest {
51 public void before() throws Exception {
55 public void after() throws Exception {
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());
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());