From 212f0917592ed112009e1827fb15c6adb8153636 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 31 Jul 2018 17:17:33 +0530 Subject: added test cases to TestMessages.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I230ad0e38a1507e0619d490a3786b97fa6d5db32 Signed-off-by: Sandeep J --- .../onap/appc/listener/demo/model/TestMessages.java | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'appc-event-listener') diff --git a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java index 997fb6dc6..2462e517e 100644 --- a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java +++ b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/demo/model/TestMessages.java @@ -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()); -- cgit 1.2.3-korg