added test cases to TestMessages.java 27/58227/4
authorSandeep J <sandeejh@in.ibm.com>
Tue, 31 Jul 2018 11:47:33 +0000 (17:17 +0530)
committerTakamune Cho <tc012c@att.com>
Tue, 31 Jul 2018 20:01:03 +0000 (20:01 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I230ad0e38a1507e0619d490a3786b97fa6d5db32
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java

index 997fb6d..2462e51 100644 (file)
@@ -6,6 +6,8 @@
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
+ * Modification Copyright (C) 2018 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
@@ -23,6 +25,7 @@
 
 package org.onap.appc.listener.demo.model;
 
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -87,12 +90,26 @@ public class TestMessages {
         assertNotNull(out.getStatus().getValue());
 
     }
+    
+    @Test
+    public void testGetRequest()
+    {
+        String request="testRequest";
+        in.setRequest(request);
+        assertEquals(request, in.getRequest());
+    }
+    
+    @Test
+    public void testIsValid()
+    {
+        assertEquals(true, in.isValid());
+    }
 
     @Test
     @Ignore
     public void testIncommingToOutgoing(){
-       OutgoingMessage newOut;
-       newOut = Mapper.mapOne(in.toOutgoing(Status.ACCEPTED), OutgoingMessage.class);
+        OutgoingMessage newOut;
+        newOut = Mapper.mapOne(in.toOutgoing(Status.ACCEPTED), OutgoingMessage.class);
         assertNotNull(newOut);
         assertNotNull(newOut.getHeader().getApiVer());
         assertNotNull(newOut.getHeader().getOriginatorId());