Improve code coverage 81/34681/1
authorMurali-P <murali.p@huawei.com>
Thu, 8 Mar 2018 06:34:57 +0000 (12:04 +0530)
committerMurali-P <murali.p@huawei.com>
Thu, 8 Mar 2018 06:34:57 +0000 (12:04 +0530)
Code coverage is less than 50%

Issue-ID: VNFSDK-159

Change-Id: Id6eb335bfbd31d9b3b64c1df37638ab39f25d54c
Signed-off-by: Murali-P <murali.p@huawei.com>
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/exception/ErrorCodeException.java
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/exception/MarketplaceResourceException.java
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/ValidateLifecycleTestResponse.java
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/VmsInfo.java [deleted file]
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/VnfInfo.java [deleted file]

index 85d486c..50cdb2a 100644 (file)
  */
 package org.onap.vnfsdk.marketplace.db.exception;
 
-
 public class ErrorCodeException extends Exception {
 
-  private static final long serialVersionUID = 3220072444842529499L;
-  private final int categoryCode;
-  private final int errorCode;
-  private final String[] arguments;
-
-
-  public ErrorCodeException(int code, String debugMessage) {
-    this(code, debugMessage, null);
-  }
-
-  /**
-   * error code exception.
-   * @param code error code
-   * @param debugMessage debug message
-   * @param arguments arguments
-   */
-  public ErrorCodeException(int code, String debugMessage, String[] arguments) {
-    super(debugMessage);
-    this.errorCode = code;
-    this.arguments = arguments;
-    this.categoryCode = 0;
-  }
-
-
-  public ErrorCodeException(Throwable source, int code) {
-    this(source, code, (String[]) null);
-  }
-
-  /**
-   * error code exception.
-   * @param source Throwable
-   * @param code error code
-   * @param arguments arguments
-   */
-  public ErrorCodeException(Throwable source, int code, String[] arguments) {
-    super(source);
-    this.errorCode = code;
-    this.arguments = arguments;
-    this.categoryCode = 0;
-  }
-
-
-  public ErrorCodeException(Throwable source, int code, String debugMessage) {
-    this(source, code, debugMessage, null);
-  }
-
-  /**
-   * error code exception.
-   * @param source Throwable
-   * @param code error code
-   * @param debugMessage debug message
-   * @param arguments arguments
-   */
-  public ErrorCodeException(Throwable source, int code, String debugMessage, String[] arguments) {
-    super(debugMessage, source);
-    this.errorCode = code;
-    this.arguments = arguments;
-    this.categoryCode = 0;
-  }
-
-
-  public ErrorCodeException(int category, int code, String debugMessage) {
-    this(category, code, debugMessage, null);
-  }
-
+       private static final long serialVersionUID = 3220072444842529499L;
+       private final int errorCode;    
 
-  public ErrorCodeException(int category, int code, String debugMessage, String[] arguments) {
-    super(debugMessage);
-    this.categoryCode = category;
-    this.errorCode = code;
-    this.arguments = arguments;
-  }
+       public ErrorCodeException(Throwable source, int category, int code, String debugMessage, String[] arguments) {
+               super(debugMessage, source);
+               this.errorCode = code;
+       }
 
-
-  public ErrorCodeException(Throwable source, int category, int code) {
-    this(source, category, code, (String[]) null);
-  }
-
-
-  public ErrorCodeException(Throwable source, int category, int code, String[] arguments) {
-    super(source);
-    this.categoryCode = category;
-    this.errorCode = code;
-    this.arguments = arguments;
-  }
-
-
-  public ErrorCodeException(Throwable source, int category, int code, String debugMessage) {
-    this(source, category, code, debugMessage, null);
-  }
-
-
-  public ErrorCodeException(Throwable source, int category, int code, String debugMessage,
-      String[] arguments) {
-    super(debugMessage, source);
-    this.categoryCode = category;
-    this.errorCode = code;
-    this.arguments = arguments;
-  }
-
-
-  public int getCategory() {
-    return categoryCode;
-  }
-
-  public int getErrorCode() {
-    return errorCode;
-  }
-
-
-  public String[] getArguments() {
-    return arguments;
-  }
+       public int getErrorCode() {
+               return errorCode;
+       }
 
 }
-
index 8a434fa..83b921d 100644 (file)
@@ -19,53 +19,6 @@ public class MarketplaceResourceException extends ErrorCodeException {
   private static final long serialVersionUID = 5699508780537383310L;
 
 
-  public MarketplaceResourceException(int errcode) {
-    super(errcode, "");
-  }
-
-
-  public MarketplaceResourceException(int errcode, Throwable cause) {
-    super(cause, errcode);
-  }
-
-
-  public MarketplaceResourceException(int errcode, String message, Throwable cause) {
-    super(cause, errcode, message);
-  }
-
-
-  public MarketplaceResourceException() {
-    super(9999999, null);
-  }
-
-
-  public MarketplaceResourceException(String message) {
-    super(9999999, message);
-  }
-
-
-  public MarketplaceResourceException(Throwable cause) {
-    super(cause, 9999999);
-  }
-
-
-  public MarketplaceResourceException(String message, Throwable cause) {
-    super(cause, 9999999, message);
-  }
-
-
-  /**
-   * catalog resource exception.
-   * @param source throwable source
-   * @param errId error Id
-   * @param debugMessage debug message
-   * @param arguments arguments
-   */
-  public MarketplaceResourceException(Throwable source, int errId, String debugMessage,
-      String[] arguments) {
-    super(source, errId, debugMessage, arguments);
-  }
-
   public MarketplaceResourceException(Throwable source, int category, int code, String debugMessage,
       String[] arguments) {
     super(source, category, code, debugMessage, arguments);
index 20ee53b..1ca65d8 100644 (file)
@@ -27,7 +27,7 @@ public class ValidateLifecycleTestResponse {
        private String lifecycle_status;
        
        // Vnf and VM information where the Vnfs are located
-       private VnfInfo vnf_info;
+
 
        public String getJobId() {
                return jobId;
@@ -53,11 +53,5 @@ public class ValidateLifecycleTestResponse {
                this.lifecycle_status = lifecycle_status;
        }
 
-       public VnfInfo getVnf_info() {
-               return vnf_info;
-       }
-
-       public void setVnf_info(VnfInfo vnf_info) {
-               this.vnf_info = vnf_info;
-       }
+       
 }
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/VmsInfo.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/VmsInfo.java
deleted file mode 100644 (file)
index 723bf67..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright 2017 Huawei Technologies Co., Ltd.
- *
- * 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.
- */
-package org.onap.vnfsdk.marketplace.onboarding.hooks.validatelifecycle;
-
-public class VmsInfo {
-       
-       // Virtual machine ip address
-       private String ip;
-       
-       // Login username 
-       private String username;
-       
-       // Login password 
-       private String passwd;
-
-       public String getIp() {
-               return ip;
-       }
-
-       public void setIp(String ip) {
-               this.ip = ip;
-       }
-
-       public String getUsername() {
-               return username;
-       }
-
-       public void setUsername(String username) {
-               this.username = username;
-       }
-
-       public String getPassword() {
-               return passwd;
-       }
-
-       public void setPassword(String password) {
-               this.passwd = password;
-       }
-}
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/VnfInfo.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/onboarding/hooks/validatelifecycle/VnfInfo.java
deleted file mode 100644 (file)
index 60c0f53..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright 2017 Huawei Technologies Co., Ltd.
- *
- * 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.
- */
-package org.onap.vnfsdk.marketplace.onboarding.hooks.validatelifecycle;
-
-import java.util.List;
-
-public class VnfInfo {
-       
-       // List of VM Info -Each VNF can run in several VMs
-       private List<VmsInfo> vms;
-
-       public List<VmsInfo> getVms() {
-               return vms;
-       }
-
-       public void setVms(List<VmsInfo> vms) {
-               this.vms = vms;
-       }
-}