aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
diff options
context:
space:
mode:
authorArthur Martella <amartell@research.att.com>2017-09-08 13:27:46 -0400
committerArthur Martella <amartell@research.att.com>2017-09-08 13:32:24 -0400
commit62cd6aaaf74aa91ee0037c0e155c8e7284f07567 (patch)
tree68c0c53c9156f5aa3c6b3599ac940770f986633d /common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
parentfa1a211d28a912892fcd888569df033900eb01ee (diff)
1710 Rebase - Second Attempt
This commit rebases changes from openecomp-mso/internal-staging-1710 up to and including this codecloud commit: 54483fc6606ddb1591a2e9da61bff8712325f924 Wed Sep 6 18:12:56 2017 -0400 Rebasing was done on a branch on top of this commit in so/master in ONAP: 93fbdfbe46104f8859d4754040f979cb7997c157 Thu Sep 7 16:42:59 2017 +0000 Change-Id: I4ad9abf40da32bf5bdca43e868b8fa2dbcd9dc59 Issue-id: SO-107 Signed-off-by: Arthur Martella <amartell@research.att.com>
Diffstat (limited to 'common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java')
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java177
1 files changed, 0 insertions, 177 deletions
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
deleted file mode 100644
index 59e8cec92d..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:07:10 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import javax.crypto.BadPaddingException;
-import javax.crypto.IllegalBlockSizeException;
-import java.security.InvalidKeyException;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class CryptoUtilsESTest extends CryptoUtilsESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- CryptoUtils.decrypt("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", "00000000000000000000000000000000");
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- byte[] byteArray0 = new byte[0];
- CryptoUtils.byteArrayToHexString(byteArray0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.encrypt("AES", "w^p&|^Cvs@K.@@");
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"w^\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.encrypt((String) null, "B2000000000000000000000000000000");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.utils.CryptoUtils", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- try {
- CryptoUtils.decrypt("B20000000000000000000000000000000000000000000000", "B20000000000000000000000000000000000000000000000");
- fail("Expecting exception: IllegalBlockSizeException");
-
- } catch(IllegalBlockSizeException | InvalidKeyException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- try {
- CryptoUtils.decrypt("0000C200000000000000000000000000", "0000C200000000000000000000000000");
- fail("Expecting exception: BadPaddingException");
-
- } catch(BadPaddingException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.decrypt("s.", "s.");
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"s.\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.decrypt("", "");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Empty key
- //
- verifyException("javax.crypto.spec.SecretKeySpec", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.byteArrayToHexString((byte[]) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.utils.CryptoUtils", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- byte[] byteArray0 = new byte[16];
- byteArray0[0] = (byte) (-78);
- String string0 = CryptoUtils.byteArrayToHexString(byteArray0);
- assertEquals("B2000000000000000000000000000000", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- String string0 = CryptoUtils.encrypt("00000000000000000000000000000000", "00000000000000000000000000000000");
- assertEquals("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.encrypt("", "");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Empty key
- //
- verifyException("javax.crypto.spec.SecretKeySpec", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- CryptoUtils cryptoUtils0 = new CryptoUtils();
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.decrypt((String) null, "00000000000000000000000000000000");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.utils.CryptoUtils", e);
- }
- }
-}