diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-02-18 10:41:17 +0100 |
---|---|---|
committer | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-02-27 16:17:57 +0100 |
commit | 58cbfa63f239b22e8feb1440919b5fc2cf0118ce (patch) | |
tree | 268a88f08b6975f096b29b14591fe61cf9aa3f3f /vid-app-common/src/main/java/org | |
parent | 389d728d8d25dc1e44f8d95bb16ce588ea9bba0e (diff) |
Increasing test coverage for vid.mso
Change-Id: I71d44c6b36babcc5b8931cda65ab86940062deda
Issue-ID: VID-387
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/java/org')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java | 9 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/mso/MsoException.java | 27 |
2 files changed, 4 insertions, 32 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java index fb93c2135..ec1c5479f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java @@ -94,7 +94,7 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { this.featureManager = featureManager; } - public static String validateEndpointPath(String endpointEnvVariable) { + public static String validateEndpointPath(String endpointEnvVariable) { String endpoint = SystemProperties.getProperty(endpointEnvVariable); if (endpoint == null || endpoint.isEmpty()) { throw new GenericUncheckedException(endpointEnvVariable + " env variable is not defined"); @@ -323,6 +323,7 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { dashboardOrchestrationReqs.addAll(scaleoutRequests); } catch (Exception e) { logException(methodName, e); + throw e; } return dashboardOrchestrationReqs; } @@ -379,7 +380,7 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { } } - private List<Task> deserializeManualTasksJson(String manualTasksJson) { + private List<Task> deserializeManualTasksJson(String manualTasksJson) { logInvocationInDebug("deserializeManualTasksJson"); ObjectMapper mapper = new ObjectMapper(); @@ -404,9 +405,7 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { String str = new String(); restObjStr.set(str); - msoClientInterface.completeManualTask(requestDetails, str, "", path, restObjStr); - - return MsoUtil.wrapResponse(restObjStr); + return msoClientInterface.completeManualTask(requestDetails, str, "", path, restObjStr); } catch (Exception e) { logException(methodName, e); diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoException.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoException.java deleted file mode 100644 index 103f4c97e..000000000 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoException.java +++ /dev/null @@ -1,27 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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========================================================= - */ - -package org.onap.vid.mso; - -public class MsoException extends RuntimeException { - public MsoException(Throwable cause) { - super(cause); - } -} |