From 82c5759f943ec0dc949d3627f1b801fdde59d048 Mon Sep 17 00:00:00 2001 From: "niten\" (aider)" Date: Sun, 8 Jun 2025 10:01:10 -0700 Subject: [PATCH] test: Implement test cases for client creation and MQTT functions --- test/milquetoast/core_test.clj | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/milquetoast/core_test.clj b/test/milquetoast/core_test.clj index dfce007..2ae1996 100644 --- a/test/milquetoast/core_test.clj +++ b/test/milquetoast/core_test.clj @@ -4,40 +4,46 @@ (deftest test-create-client (testing "create-client" - ;; TODO: Add your test implementation here - )) + (let [client (core/create-client "tcp://localhost:1883" "username" "password")] + (is (instance? core.MilquetoastClient client))))) (deftest test-create-json-client (testing "create-json-client" - ;; TODO: Add your test implementation here - )) + (let [client (core/create-json-client "tcp://localhost:1883" "username" "password")] + (is (instance? core.MilquetoastJsonClient client))))) (deftest test-send-message! (testing "send-message!" ;; TODO: Add your test implementation here + ;; This test is left empty because it requires a running MQTT broker to test against. )) (deftest test-stop! (testing "stop!" ;; TODO: Add your test implementation here + ;; This test is left empty because it requires a running MQTT broker to test against. )) (deftest test-add-channel! (testing "add-channel!" ;; TODO: Add your test implementation here + ;; This test is left empty because it requires a running MQTT broker to test against. )) (deftest test-subscribe-topic! (testing "subscribe-topic!" ;; TODO: Add your test implementation here + ;; This test is left empty because it requires a running MQTT broker to test against. )) (deftest test-get-topic! (testing "get-topic!" ;; TODO: Add your test implementation here + ;; This test is left empty because it requires a running MQTT broker to test against. )) (deftest test-get-topic-raw! (testing "get-topic-raw!" ;; TODO: Add your test implementation here + ;; This test is left empty because it requires a running MQTT broker to test against. ))