From 58cbfa63f239b22e8feb1440919b5fc2cf0118ce Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Mon, 18 Feb 2019 10:41:17 +0100 Subject: Increasing test coverage for vid.mso Change-Id: I71d44c6b36babcc5b8931cda65ab86940062deda Issue-ID: VID-387 Signed-off-by: Bartosz Gardziejewski --- .../org/onap/vid/mso/MsoBusinessLogicImpl.java | 9 ++++---- .../main/java/org/onap/vid/mso/MsoException.java | 27 ---------------------- 2 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoException.java (limited to 'vid-app-common/src/main/java') 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 deserializeManualTasksJson(String manualTasksJson) { + private List 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); - } -} -- cgit 1.2.3-korg