From 6387653c4058694b0cb6bf53efc64e79918b87e2 Mon Sep 17 00:00:00 2001 From: xuegao Date: Thu, 11 Mar 2021 20:04:46 +0100 Subject: Adding unit tests Adding unit tests to improve test coverage. Issue-ID: SDC-3428 Signed-off-by: xuegao Change-Id: I685f01886b314dea9b8507afd93937e070d7501d --- .../sdc/common/errors/ErrorCodeAndMessage.java | 40 +++++----------------- 1 file changed, 9 insertions(+), 31 deletions(-) (limited to 'openecomp-be/lib/openecomp-common-lib') diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java index 58f073935a..d7c5c63506 100644 --- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java +++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java @@ -7,9 +7,9 @@ * 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. @@ -21,12 +21,19 @@ package org.openecomp.sdc.common.errors; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + import javax.ws.rs.core.Response; /** * This class represents an error object to be returned in failed REST instead of just returning one * of HTTP fail statuses. */ +@Getter +@Setter +@NoArgsConstructor public class ErrorCodeAndMessage { /** @@ -44,9 +51,6 @@ public class ErrorCodeAndMessage { */ private String message; - public ErrorCodeAndMessage() { - } - /** * Instantiates a new Error code and message. * @@ -58,30 +62,4 @@ public class ErrorCodeAndMessage { this.message = errorCode.message(); this.errorCode = errorCode.id(); } - - - public Response.Status getStatus() { - return status; - } - - public void setStatus(Response.Status status) { - this.status = status; - } - - public String getErrorCode() { - return errorCode; - } - - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - } -- cgit 1.2.3-korg