aboutsummaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java')
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java b/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java
index cf27dce63..529fa368b 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/utils/ArtifactHandlerProviderUtilTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* ================================================================================
@@ -11,15 +11,14 @@
* 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
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
* ============LICENSE_END=========================================================
*/
@@ -32,8 +31,8 @@ import java.io.IOException;
import java.nio.charset.Charset;
import org.apache.commons.io.IOUtils;
import org.json.JSONObject;
-import org.junit.Test;
import org.junit.Ignore;
+import org.junit.Test;
import org.mockito.Mockito;
import org.opendaylight.yang.gen.v1.org.onap.appc.artifacthandler.rev170321.UploadartifactInput;
import org.opendaylight.yang.gen.v1.org.onap.appc.artifacthandler.rev170321.UploadartifactInputBuilder;
@@ -57,7 +56,7 @@ public class ArtifactHandlerProviderUtilTest {
ahprovider.processTemplate(obj.toString());
}
- @Ignore
+ // @Ignore
@Test(expected = Exception.class)
public void testcreateDummyRequestData() throws Exception {
String artifact_conetent = IOUtils.toString(ArtifactHandlerProviderUtilTest.class.getClassLoader()
@@ -67,7 +66,7 @@ public class ArtifactHandlerProviderUtilTest {
obj.put("artifact-version", "0.01");
obj.put("artifact-contents", artifact_conetent);
ArtifactHandlerProviderUtil ahprovider = new ArtifactHandlerProviderUtil();
- ahprovider.createDummyRequestData();
+ String requestInfo = ahprovider.createDummyRequestData();
}
@Test
@@ -78,6 +77,13 @@ public class ArtifactHandlerProviderUtilTest {
}
@Test
+ public void testGetRandom() throws Exception {
+ ArtifactHandlerProviderUtil ahprovider = new ArtifactHandlerProviderUtil();
+ Whitebox.invokeMethod(ahprovider, "getRandom");
+ assertTrue(true);
+ }
+
+ @Test
public void testEscapeUtils() throws Exception {
String str = "The Test string is 'test'";
assertEquals("The Test string is ''test''", EscapeUtils.escapeSql(str));
@@ -105,7 +111,8 @@ public class ArtifactHandlerProviderUtilTest {
builder.setRequestInformation(mockRequestInformation);
UploadartifactInput uploadArtifactInput = builder.build();
Whitebox.setInternalState(ahprovider, "templateData", uploadArtifactInput);
- assertTrue(ahprovider.createDummyRequestData().startsWith("{\"input\": {\"document-parameters\":{\"service-uuid\":\"TLSUUIDREQUEST ID\""));
+ assertTrue(ahprovider.createDummyRequestData()
+ .startsWith("{\"input\": {\"document-parameters\":{\"service-uuid\":\"TLSUUIDREQUEST ID\""));
}
@Test
@@ -125,4 +132,3 @@ public class ArtifactHandlerProviderUtilTest {
ahProvider.createRequestData());
}
}
-