From 0dd940f8206718d9c09d7f93bac276375fb79fd2 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 17 May 2019 12:33:57 +0200 Subject: [PATCH] added some todos & organize input files --- main/src/data_test.clj | 8 ++++++-- .../should-test-with-data-explicit-version.edn | 0 .../should-test-with-data-macro-version.edn | 0 test/src/data_test_test.clj | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) rename test/resources/{ => data_test_test}/should-test-with-data-explicit-version.edn (100%) rename test/resources/{ => data_test_test}/should-test-with-data-macro-version.edn (100%) diff --git a/main/src/data_test.clj b/main/src/data_test.clj index 0a8d463..d7b7458 100644 --- a/main/src/data_test.clj +++ b/main/src/data_test.clj @@ -31,7 +31,11 @@ (defmacro defdatatest [name & body] `(do - (ct/deftest ~name - (let [testdata (sut/read-data (io/resource "should-test-with-data-macro-version.edn")) + (ct/deftest ~name + ;TODO-1: bring macro to work + ;TODO-2: crate filename out of package/namespace/test-name.edn + ;TODO-3: enable more than one test-data-set with optional infix .## + (let [testdata (sut/read-data + (io/resource "data_test_test/should-test-with-data-macro-version.edn")) {:keys [input expectation]} testdata] ~body)))) diff --git a/test/resources/should-test-with-data-explicit-version.edn b/test/resources/data_test_test/should-test-with-data-explicit-version.edn similarity index 100% rename from test/resources/should-test-with-data-explicit-version.edn rename to test/resources/data_test_test/should-test-with-data-explicit-version.edn diff --git a/test/resources/should-test-with-data-macro-version.edn b/test/resources/data_test_test/should-test-with-data-macro-version.edn similarity index 100% rename from test/resources/should-test-with-data-macro-version.edn rename to test/resources/data_test_test/should-test-with-data-macro-version.edn diff --git a/test/src/data_test_test.clj b/test/src/data_test_test.clj index f4e8263..bd427c3 100644 --- a/test/src/data_test_test.clj +++ b/test/src/data_test_test.clj @@ -27,7 +27,7 @@ ) (deftest should-test-with-data-explicit-version - (let [testdata (sut/read-data (io/resource "should-test-with-data-explicit-version.edn")) + (let [testdata (sut/read-data (io/resource "data_test_test/should-test-with-data-explicit-version.edn")) {:keys [input expectation]} testdata] (is (= expectation input))))