diff --git a/src/boilerpipe_clj/extractors.clj b/src/boilerpipe_clj/extractors.clj index 2ca5b41..94be0d4 100644 --- a/src/boilerpipe_clj/extractors.clj +++ b/src/boilerpipe_clj/extractors.clj @@ -1,5 +1,5 @@ -(ns boilerpipe-clj.extractors - (:import (de.l3s.boilerpipe.extractors +(ns boilerpipe-clj.extractors + (:import (de.l3s.boilerpipe.extractors ArticleExtractor ArticleSentencesExtractor DefaultExtractor))) diff --git a/test/boilerpipe_clj/core_test.clj b/test/boilerpipe_clj/core_test.clj index 8049792..e961caf 100644 --- a/test/boilerpipe_clj/core_test.clj +++ b/test/boilerpipe_clj/core_test.clj @@ -3,24 +3,23 @@ [boilerpipe-clj.core :refer :all] [boilerpipe-clj.extractors :as ext])) -(defonce test-article +(defonce test-article (slurp "./test/boilerpipe_clj/resources/greenspun-test.html")) (def extractors [ext/default-extractor ext/article-extractor ext/article-sentence-extractor]) -;; TODO: Why does lein test say it tests 6400 assertions? (deftest get-text-extraction (testing "get-text extracts something from an article without a provided extractor" - (let [res (get-text test-article)] - (is (and + (let [res (get-text test-article)] + (is (and (not= res "") (not= res nil))))) (testing "All the available extractors extract something from the article" (doseq [ext extractors - res (get-text test-article ext)] + :let [res (get-text test-article ext)]] (is (and (not= res "") (not (nil? res)))))))