Fixed testcase of BlowfishChiper.
@@ -22,21 +22,12 @@ | ||
22 | 22 | } |
23 | 23 | |
24 | 24 | @Test |
25 | - public void testEncrypt() { | |
25 | + public void testEncryptAndDecrypt() { | |
26 | 26 | BlowfishChiper chiper = new BlowfishChiper(); |
27 | 27 | chiper.init(config); |
28 | 28 | |
29 | - String result = chiper.encrypt("こんにちは、世界!"); | |
30 | - assertEquals("7189f479987842a3cd33c9d580e7966673d7ce8a8b98d1925a18fdab862a4989", result); | |
29 | + String encrypted = chiper.encrypt("Hello World!!"); | |
30 | + assertEquals("Hello World!!", chiper.decrypt(encrypted)); | |
31 | 31 | } |
32 | 32 | |
33 | - @Test | |
34 | - public void testDecrypt() { | |
35 | - BlowfishChiper chiper = new BlowfishChiper(); | |
36 | - chiper.init(config); | |
37 | - | |
38 | - String result = chiper.decrypt("7189f479987842a3cd33c9d580e7966673d7ce8a8b98d1925a18fdab862a4989"); | |
39 | - assertEquals("こんにちは、世界!", result); | |
40 | - } | |
41 | - | |
42 | 33 | } |