added test case to TestValidatorService.java 15/58415/3
authorSandeep J <sandeejh@in.ibm.com>
Wed, 1 Aug 2018 12:18:43 +0000 (17:48 +0530)
committerTakamune Cho <tc012c@att.com>
Thu, 2 Aug 2018 00:21:19 +0000 (00:21 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: Id3d7d93fb02d62be8288ae7065b69b22ce1d8c2f
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestValidatorService.java

index 2f0a1ff..ada599d 100644 (file)
@@ -6,6 +6,8 @@
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
+ * Modification Copyright 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
@@ -25,7 +27,7 @@ package org.onap.appc.design.validator;
 
 import java.io.InputStream;
 import java.util.Enumeration;
-import java.util.HashMap;
+import java.util.HashMap; 
 import java.util.Properties;
 import org.junit.Before;
 import org.junit.Test;
@@ -127,4 +129,14 @@ public class TestValidatorService {
         Assert.assertEquals(null, response);
         
     }
+    
+    @Test
+    public void testValidValidateVelocity() throws Exception{
+        String response = null;
+        String validateVelocity = "{\"Test\" \"Test1\" }";
+        ValidatorService vs = new ValidatorService();
+        response = vs.execute("", validateVelocity, "VELOCITY");
+        Assert.assertEquals("success", response);
+        
+    }
 }