aboutsummaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-artifact-handler/provider/src/main
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-01-21 13:02:33 +0000
committerTakamune Cho <takamune.cho@att.com>2019-01-21 21:22:51 +0000
commit63b928252c2d5ef905f5e074fa8bbcfbf460d780 (patch)
tree78f9bd6edf62fc2109039326fa42ba3656eca384 /appc-inbound/appc-artifact-handler/provider/src/main
parent0e9e5821fbd918fb9b33ad8ba5d311e7f527bcab (diff)
Correct unit tests for DBService class
Increased test coverage from 74% to 92% in DBService class Issue-ID: APPC-1335 Change-Id: Iabd792eb104429d5090e0099dba463e8ad6d499a Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-inbound/appc-artifact-handler/provider/src/main')
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
index 24dd4f477..cf45bc32e 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,7 +82,7 @@ public class DBService {
if (serviceLogic != null && ctx != null) {
String key = "select max(internal_version) as maximum from ASDC_ARTIFACTS WHERE ARTIFACT_NAME = '"
+ artifactName + "'";
- log.info("Getting internal Versoin :" + key);
+ log.info("Getting internal Version :" + key);
status = serviceLogic.query("SQL", false, null, key, prefix, null, ctx);
if (status.toString().equals(FAILURE_PARAM)) {
throw new SvcLogicException("Error - getting internal Artifact Number");
@@ -141,7 +143,7 @@ public class DBService {
+ " message_type = $log-message-type , " + " message = $log-message ;";
status = serviceLogic.save("SQL", false, false, key, null, prefix, ctx);
if (status.toString().equals(FAILURE_PARAM)) {
- throw new SvcLogicException("Error while loging data");
+ throw new SvcLogicException("Error while logging data");
}
}