Exceptions are classes, so just import them.
(ns myproj.battle-test (:use clojure.test myproj.battle) (:import a.package.which.contains.AssertionException)) ...
Find where (in which package) the AssertionException
is located, and replace it with a.package.which.contains
in the above code.
Or you can use the full name instead, as in the sentence :import
above, but it can be tedious if you have several places where you use the class.
UPD I made a mistake. There is no such class, AssertionException
. There is an AssertionError
class, and since it is inside the java.lang
, it is automatically imported. Clojure pre / post conditions throw it, so use an AssertionError
instead of an AssertionException
, and your code should work fine.
source share