diff options
author | Murali-P <murali.p@huawei.com> | 2017-02-16 10:47:38 +0530 |
---|---|---|
committer | Murali-P <murali.p@huawei.com> | 2017-02-16 10:47:38 +0530 |
commit | 06841e7e140a54cea172980690a15787a4145a72 (patch) | |
tree | 89934075cce1ca3cc21a2a0f7f17a5c3f995d7d6 /vnf-sdk-function-test/src/test | |
parent | 884427c640aaa59a24e6645576522c009aebff06 (diff) |
Fix Sonar Issue
Resolved:VNFSDK-21
VNF SDK Function test
Change-Id: I2e1687d928e26c47798a1fc52d1b34984777c275
Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'vnf-sdk-function-test/src/test')
-rw-r--r-- | vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java index ba3bd5d..14db973 100644 --- a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java +++ b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java @@ -26,22 +26,23 @@ import org.openo.vnfsdk.functest.FileUtil; public class FileUtilTest { - private String createDirPath = "C:/Users/Administrator/Desktop/Unzip"; + private String createDirPath = "." + File.separator + "tempvnf"; - private String deleteDirPath = "D:/deletefolder"; + private String deleteDirPath = createDirPath; private String zipFileName = "src/test/resources/RobotScript.zip"; - private String extractZip = "D:/Test/AA"; - - private String getDirectory = "D:/Test/AA"; - @Test public void testCreateDirectory() { assertTrue(FileUtil.createDirectory(createDirPath)); } @Test + public void testDeleteDirectory() { + FileUtil.deleteDirectory(deleteDirPath); + } + + @Test public void testDeleteFile() { assertTrue(FileUtil.deleteFile(new File(deleteDirPath))); } |