diff options
author | ezhil <ezhrajam@in.ibm.com> | 2020-05-12 22:48:34 +0530 |
---|---|---|
committer | ezhil <ezhrajam@in.ibm.com> | 2020-05-12 22:48:42 +0530 |
commit | 2f7c3e613ad9e8a8ae04089fc549c100df341918 (patch) | |
tree | a92e2dfd6cc87efa1682c321e06186bf38dd641c | |
parent | 6226caf98a481b7a4e51ba066b96ed81b96dd071 (diff) |
Junit for OperationProgress
Issue-ID: USECASEUI-439
Change-Id: Id5bfe1e8bbc83c2faeff08879065cee3dace1c01
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
-rw-r--r-- | server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressTest.java | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressTest.java index 1f3cb84e..fae9cf4e 100644 --- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressTest.java +++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/so/bean/OperationProgressTest.java @@ -40,6 +40,8 @@ import org.hibernate.Transaction; import mockit.Mock; import mockit.MockUp; +import static org.junit.Assert.assertEquals; + public class OperationProgressTest { @Before @@ -53,15 +55,17 @@ public class OperationProgressTest { @Test public void testOperationProgress() throws Exception { OperationProgress op = new OperationProgress(); - op.setUserId(""); - op.setOperationId(""); - op.setOperation(""); - op.setResult(""); - op.setReason(""); - op.setOperationContent(""); - op.setProgress(1); - op.setOperateAt(""); - op.setFinishedAt(""); + op.setUserId("test"); + op.setOperationId("test"); + op.setOperation("test"); + op.setResult("test"); + op.setReason("test"); + op.setOperationContent("test"); + op.setProgress(123); + op.setOperateAt("test"); + op.setFinishedAt("test"); + op.setServiceId("123"); + op.setServiceName("test"); op.getOperationId(); op.getOperation(); op.getResult(); @@ -70,6 +74,33 @@ public class OperationProgressTest { op.getOperationContent(); op.getProgress(); op.getOperateAt(); - op.getFinishedAt(); + assertEquals("123",op.getServiceId()); + assertEquals("test",op.getOperationId()); + assertEquals("test",op.getServiceName()); + assertEquals("test",op.getOperation()); + assertEquals("test",op.getResult()); + assertEquals("test",op.getReason()); + assertEquals("test",op.getUserId()); + assertEquals("test",op.getFinishedAt()); + assertEquals("test",op.getOperateAt()); + assertEquals("test",op.getOperationContent()); + assertEquals(123,op.getProgress()); + + } + @Test + public void testConstructor(){ + OperationProgress op = new OperationProgress("123","test","test","test","test","test","test","test",123,"test","test"); + assertEquals("123",op.getServiceId()); + assertEquals("test",op.getOperationId()); + assertEquals("test",op.getServiceName()); + assertEquals("test",op.getOperation()); + assertEquals("test",op.getResult()); + assertEquals("test",op.getReason()); + assertEquals("test",op.getUserId()); + assertEquals("test",op.getFinishedAt()); + assertEquals("test",op.getOperateAt()); + assertEquals("test",op.getOperationContent()); + assertEquals(123,op.getProgress()); + } } |