Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Works ok in clojure REPL, but not in Java unit test
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
You can’t perform that action at this time.