   (:require [clojure.test :refer :all]
             [codewars.core :refer [-main]]
             [cheshire.core :as json]
+            [codewars.clojure.test]
             [codewars.runner :refer [run]]))
 
 (deftest sanity-check

      (is (= {:type :summary, :fail 0, :error 0, :pass 0, :test 0}
             (-main))))))

(deftest handle-java
  (testing "-main can handle a very basic java solution and fixture"
    (with-in-str (json/generate-string
                  {:language "java"
                   :solution "class Foo {}"
                   :fixture "class Bar {}"})
      (is (= org.junit.runner.Result (class (-main)))))))

      (with-redefs [run identity]
        (is (= 1 (-main)))))))

(deftest nonsense-language
  (testing "An illegal argument exception will be emitted by main if an invalid language is passed"
    (with-in-str "{\"language\": \"blorg\"}"
      (is (thrown? IllegalArgumentException (-main))))))

(deftest basic-clojure
  (testing "-main can handle a very basic clojure solution and fixture"
    (with-in-str
      (json/generate-string
