summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test
diff options
context:
space:
mode:
authorSravanKumarGunda <sravan.kumar1@huawei.com>2020-07-30 21:30:09 +0530
committerSravanKumarGunda <sravan.kumar1@huawei.com>2020-08-18 12:59:42 +0530
commit6750f9e73f44e7fc6854d570142e6d30f5d3cd24 (patch)
tree564ea9d6f917358543a40ea8fd70a1670a8ea8cd /csarvalidation/src/test
parent41c8b867dc2057933fce671f8c85e3b11385ea1d (diff)
Code Improvements-Vnfsdk-validation sonar issue fixes
Signed-off-by: SravanKumarGunda <sravan.kumar1@huawei.com> Issue-ID: VNFSDK-608 Change-Id: Idba9f4876e41b699e2a2ac836eb2090f3694d0f1
Diffstat (limited to 'csarvalidation/src/test')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/security/ShaHashCodeGeneratorTest.java10
-rw-r--r--csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarValidatorTest.java7
2 files changed, 13 insertions, 4 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/security/ShaHashCodeGeneratorTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/security/ShaHashCodeGeneratorTest.java
index 1ea5dd5..b5c4efa 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/security/ShaHashCodeGeneratorTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/security/ShaHashCodeGeneratorTest.java
@@ -39,8 +39,9 @@ public class ShaHashCodeGeneratorTest {
final String hashCode = shaHashCodeGenerator.generateSha256("test".getBytes());
- assertThat(hashCode).isEqualTo(shaHashCodeGenerator.generateSha256("test".getBytes()));
- assertThat(hashCode).isNotEqualTo(shaHashCodeGenerator.generateSha256("Test".getBytes()));
+ assertThat(hashCode)
+ .isEqualTo(shaHashCodeGenerator.generateSha256("test".getBytes()))
+ .isNotEqualTo(shaHashCodeGenerator.generateSha256("Test".getBytes()));
}
@Test
@@ -48,7 +49,8 @@ public class ShaHashCodeGeneratorTest {
final String hashCode = shaHashCodeGenerator.generateSha512("test".getBytes());
- assertThat(hashCode).isEqualTo(shaHashCodeGenerator.generateSha512("test".getBytes()));
- assertThat(hashCode).isNotEqualTo(shaHashCodeGenerator.generateSha512("Test".getBytes()));
+ assertThat(hashCode)
+ .isEqualTo(shaHashCodeGenerator.generateSha512("test".getBytes()))
+ .isNotEqualTo(shaHashCodeGenerator.generateSha512("Test".getBytes()));
}
} \ No newline at end of file
diff --git a/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarValidatorTest.java b/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarValidatorTest.java
index c2856d9..395b866 100644
--- a/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarValidatorTest.java
+++ b/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarValidatorTest.java
@@ -312,4 +312,11 @@ public class CsarValidatorTest {
dst.mkdir();
assertTrue(FileUtil.deleteFile(dstPath));
}
+
+ @Test
+ public void testCreateDirectory() {
+ String dirPath = "src//test//resources//TestDirectory";
+ boolean res = FileUtil.createDirectory(dirPath);
+ assertTrue(res);
+ }
}