aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-01 16:34:54 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-08-01 18:19:22 +0000
commitde5607b30a107d7e11c63e70556391dfe44230d0 (patch)
tree77280b5fc703bc8aba504fcce043f7d5a5aafc60
parentc18126b9d41a6a65f33c28294895c3c0c47339c5 (diff)
updated existing test case to increase coverage
updated existing test case to increase code coverage Issue-ID: APPC-1086 Change-Id: Iea8d0a833872cec864436300c4bcbc9e55cd3316 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestEscapeUtils.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestEscapeUtils.java b/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestEscapeUtils.java
index 8018965b5..0ebc768e6 100644
--- a/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestEscapeUtils.java
+++ b/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestEscapeUtils.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,20 +25,20 @@
package org.onap.appc.design.validator;
-import java.io.IOException;
import org.junit.Test;
import org.onap.appc.design.services.util.EscapeUtils;
-import org.onap.appc.design.xinterface.XInterfaceService;
-import org.onap.appc.design.xinterface.XResponseProcessor;
+
import junit.framework.Assert;
public class TestEscapeUtils {
-
+
@Test
public void testEscapeUtils() {
- EscapeUtils escapeUtils = new EscapeUtils();
- String str = escapeUtils.escapeSql("\\'Test Data\\'");
- assert (true);
+ String expected="\\\\''Test Data\\\\''";
+ String str = EscapeUtils.escapeSql("\\'Test Data\\'");
+ String str1=EscapeUtils.escapeSql(null);
+ Assert.assertEquals(expected, str);
+ Assert.assertNull(str1);
}
}