Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correct ctor test for BlowfishTupleSerializer

Addresses other code clarity issues from pull request.
  • Loading branch information...
commit 2f81fe091c2255583944ba57aa62b1a4fd5d04c6 1 parent 873f52d
@d2r d2r authored
View
15 test/clj/backtype/storm/security/serialization/BlowfishTupleSerializer_test.clj
@@ -1,6 +1,7 @@
(ns backtype.storm.security.serialization.BlowfishTupleSerializer-test
(:use [clojure test]
[backtype.storm.util :only (exception-cause?)]
+ [clojure.string :only (join split)]
)
(:import [backtype.storm.security.serialization BlowfishTupleSerializer]
[backtype.storm.utils ListDelegate]
@@ -10,18 +11,10 @@
)
(deftest test-constructor-throws-on-null-key
- (let [conf {}]
- (try
- (new BlowfishTupleSerializer nil conf)
- (catch Throwable t
- (is (exception-cause? java.lang.RuntimeException t)
- "Throws RuntimeException when no encryption key is given.")
- )
- )
- )
+ (is (thrown? RuntimeException (new BlowfishTupleSerializer nil {}))
+ "Throws RuntimeException when no encryption key is given.")
)
-(use '[clojure.string :only (join split)])
(deftest test-encrypts-and-decrypts-message
(let [
@@ -50,7 +43,7 @@
]
(-> delegate (.addAll strlist))
(-> writer-bts (.write kryo output delegate))
- (-> input (.setBuffer (-> output (.getBuffer))))
+ (.setBuffer input (.getBuffer output))
(is
(=
test-text
Please sign in to comment.
Something went wrong with that request. Please try again.