Skip to content

Commit

Permalink
Merge pull request #32 from rifter42/clj_tests
Browse files Browse the repository at this point in the history
Tests for clojure code blocks
  • Loading branch information
Feynman43 authored Jan 21, 2022
2 parents b34d876 + 060650f commit 6a64527
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
21 changes: 21 additions & 0 deletions test/symbolic_computation_ica1/chatbot_test.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(ns symbolic-computation-ica1.chatbot-test
(:require [clojure.test :refer :all]
[symbolic-computation-ica1.chatbot :refer :all]))

(deftest print-bot-test
(testing "Bot output testing"
(is (= "Bot> Med\n"
(binding [*out* (java.io.StringWriter.)]
(print-bot "Med")
(str *out*))))

(is (= "Bot> Anastasia\n"
(binding [*out* (java.io.StringWriter.)]
(print-bot "Anastasia")
(str *out*))))))

(deftest exit?-test
(testing "Exit predicate testing"
(is (exit? "exit"))
(is (exit? "bye"))
(is (exit? "quit"))))
7 changes: 0 additions & 7 deletions test/symbolic_computation_ica1/core_test.clj

This file was deleted.

0 comments on commit 6a64527

Please sign in to comment.