Created
December 5, 2010 20:18
-
-
Save anonymous/729428 to your computer and use it in GitHub Desktop.
Works ok in clojure REPL, but not in Java unit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given a function on a class that is compiled as BoardUpdateFunctions: | |
(defn -editCardWithAction [this user board-id card-id actions] | |
(let [action-blocks (.split actions ";")] | |
(do | |
(.info logger (str "edit card with: " (alength action-blocks))) | |
(map #(.info logger (str "perform card action: " %)) action-blocks)))) | |
com.pegby.service.clj.boardUpdate=> (-editCardWithAction nil "test" "test" 123 "first: something; second: else; third: stuff") | |
0 [main] INFO com.pegby.service.clj.boardUpdate - edit card with: 3 | |
7 [main] INFO com.pegby.service.clj.boardUpdate - perform card action: first: something | |
7 [main] INFO com.pegby.service.clj.boardUpdate - perform card action: second: else | |
7 [main] INFO com.pegby.service.clj.boardUpdate - perform card action: third: stuff | |
(nil nil nil) | |
But if I have a unit test: | |
BoardUpdateFunctions f = new BoardUpdateFunctions(); | |
f.editCardWithAction("test", "test", 123L, "first: something; second: else; third: stuff"); | |
I only get: | |
0 [main] INFO com.pegby.service.clj.boardUpdate - edit card with: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment