/**
* Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
*
+ * ================================================================================
+ * Modifications Copyright (C) 2020 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
import mockit.Mock;
import mockit.MockUp;
+import static org.junit.Assert.assertEquals;
+
public class OperationProgressInformationTest {
@Before
}
@Test
- public void testOperationProgressInformation() throws Exception {
+ public void testGet() throws Exception {
OperationProgressInformation opi = new OperationProgressInformation();
- opi.setOperationStatus(null);
- opi.getOperationStatus();
+ OperationProgress op = new OperationProgress("123","test","test","test","test","test","test","test",123,"test","test");
+ opi.setOperationStatus(op);
+ assertEquals(op,opi.getOperationStatus());
+ }
+ @Test
+ public void testConstructor() throws Exception {
+ OperationProgress op = new OperationProgress("123","test","test","test","test","test","test","test",123,"test","test");
+ OperationProgressInformation opi = new OperationProgressInformation(op);
+ assertEquals(op,opi.getOperationStatus());
}
}
/**
* Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
*
+ * ================================================================================
+ * Modifications Copyright (C) 2020 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
import mockit.Mock;
import mockit.MockUp;
+import static org.junit.Assert.assertEquals;
+
public class OperationTest {
@Before
@Test
public void testOperation() throws Exception {
Operation o = new Operation();
- o.setServiceId("");
- o.setOperationId("");
- o.getServiceId();
- o.getOperationId();
+ o.setServiceId("123");
+ o.setOperationId("123");
+ assertEquals("123",o.getServiceId());
+ assertEquals("123",o.getOperationId());
}
}
/**
* Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
*
+ * ================================================================================
+ * Modifications Copyright (C) 2020 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
import mockit.Mock;
import mockit.MockUp;
+import static org.junit.Assert.assertEquals;
+
public class ServiceOperationTest {
@Before
@Test
public void testServiceOperation() throws Exception {
ServiceOperation so = new ServiceOperation();
- so.setService(null);
- so.getService();
+ Operation o = new Operation();
+ o.setServiceId("123");
+ o.setOperationId("123");
+ so.setService(o);
+ assertEquals(o,so.getService());
}
}