From 78028f3b588241200e31b71b8190e9926af626e9 Mon Sep 17 00:00:00 2001 From: Ofir Sonsino Date: Mon, 9 Oct 2017 11:08:05 +0300 Subject: Improve SONAR coverage Change-Id: Ib36c2e6df9fe100a301b89769078c7a06d3a9ae5 Issue-ID: VID-72 Signed-off-by: Ofir Sonsino --- .../java/org/openecomp/vid/mso/MsoUtilTest.java | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java (limited to 'vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java') diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java new file mode 100644 index 00000000..6a9816e3 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java @@ -0,0 +1,53 @@ +package org.openecomp.vid.mso; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.glassfish.jersey.client.ClientResponse; +import org.junit.Assert; +import org.junit.Test; + +public class MsoUtilTest { + + private MsoUtil createTestSubject() { + return new MsoUtil(); + } + + @Test + public void testWrapResponse() throws Exception { + String body = ""; + int statusCode = 0; + MsoResponseWrapper result; + + // default test + result = MsoUtil.wrapResponse(body, statusCode); + } + + + @Test + public void testWrapResponse_2() throws Exception { + RestObject rs = null; + MsoResponseWrapper result; + + // test 1 + result = MsoUtil.wrapResponse(rs); + Assert.assertNotNull(result); + } + + @Test + public void testConvertPojoToString() throws Exception { + T t = null; + String result; + + // test 1 + t = null; + result = MsoUtil.convertPojoToString(t); + Assert.assertEquals("", result); + } + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + MsoUtil.main(args); + } +} \ No newline at end of file -- cgit 1.2.3-korg