summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java51
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java39
-rw-r--r--vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestExceptionTest.java41
3 files changed, 0 insertions, 131 deletions
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java
deleted file mode 100644
index af2a612..0000000
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java
+++ /dev/null
@@ -1,51 +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.openo.vnfsdk.functest.exception;
-
-public class VnfSdkFuncTestException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private String errorCode;
-
- private String errorMsg;
-
- public String getErrorCode() {
- return errorCode;
- }
-
- public void setErrorCode(String errorCode) {
- this.errorCode = errorCode;
- }
-
- public String getErrorMsg() {
- return errorMsg;
- }
-
- public void setErrorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- }
-
- public VnfSdkFuncTestException() {
- super();
- }
-
- public VnfSdkFuncTestException(String errorCode, String errorMsg) {
- this.errorCode = errorCode;
- this.errorMsg = errorMsg;
- }
-}
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java
index 885a97a..02a0609 100644
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java
+++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java
@@ -43,45 +43,6 @@ public class ZipCompressor {
}
/**
- * compress file according several path.
- *
- * @param pathName file path name
- * @throws Exception
- */
- public void compress(String... pathName) {
- ZipOutputStream out = null;
- FileOutputStream fileOutputStream = null;
- CheckedOutputStream cos = null;
- try {
- fileOutputStream = new FileOutputStream(zipFile);
- cos = new CheckedOutputStream(fileOutputStream, new CRC32());
- out = new ZipOutputStream(cos);
- String basedir = "";
- for(int i = 0; i < pathName.length; i++) {
- compress(new File(pathName[i]), out, basedir);
- }
-
- } catch(FileNotFoundException e1) {
- try {
- throw new FileNotFoundException("Failed to find file: ");
- } catch(FileNotFoundException e) {
- LOG.error("compress: ", e);
- }
- } finally {
- try {
- if(out != null)
- out.close();
- if(fileOutputStream != null)
- fileOutputStream.close();
- if(cos != null)
- cos.close();
- } catch(Exception e1) {
- LOG.error("Error while closing stream: ", e1);
- }
- }
- }
-
- /**
* compress file according file path.
*
* @param srcPathName file path name
diff --git a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestExceptionTest.java b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestExceptionTest.java
deleted file mode 100644
index a54247d..0000000
--- a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestExceptionTest.java
+++ /dev/null
@@ -1,41 +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.openo.vnfsdk.functest.exception;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class VnfSdkFuncTestExceptionTest {
-
- private VnfSdkFuncTestException sdkFuncTestException;
-
- @Before
- public void setup() {
- sdkFuncTestException = new VnfSdkFuncTestException();
- }
-
- @Test
- public void testSetErrorCode() {
- sdkFuncTestException.setErrorCode("1001");
- }
-
- @Test
- public void testSetErrorMsg() {
- sdkFuncTestException.setErrorMsg("message");
-
- }
-}