<commit_before>(ns lein-xjc.t-plugin
  (:require [cljito.core :refer :all]
            [lein-xjc.plugin :as plugin]
            [lein-xjc.internal.target-dir :as td]
            [lein-xjc.internal.xjc :as xjc]
            [midje.sweet :refer :all])
  (:import [com.sun.tools.xjc Driver]))

(def base-project {:name "base-project"
                   :group "A (non-existent) sample project used for testing"
                   :version "0.1.0-SNAPSHOT"
                   :target-path "/path/to/missing/directory/target"
                   :root "/path/to/missing/directory"
                   :java-source-paths ["src/main/java"]})

(defn merge-project-snippet
  [snippet & snippets]
  (merge base-project snippet snippets))

(facts "about xjc-task"
       (fact "Given no plugin config creates a 'generated-java' directory inside
             the project's target directory."
             (let [project (merge-project-snippet {})
                   project-root (:root project)
                   target-path (:target-path project)
                   generated-java "generated-java"]
               (plugin/xjc-task project) => irrelevant
               (provided
                 (td/mk-xjc-target-dir project-root target-path generated-java)
                 => ..xjc-target-dir..)))<commit_msg>Clean up.<commit_after>(ns lein-xjc.t-plugin
  (:require [cljito.core :refer :all]
            [lein-xjc.plugin :as plugin]
            [lein-xjc.internal.target-dir :as td]
            [lein-xjc.internal.xjc :as xjc]
            [midje.sweet :refer :all])
  (:import [com.sun.tools.xjc Driver]))

(facts "about xjc-task"
       (fact "It creates a generated-java directory"
             (let [project {:root ..project-root..
                            :target-path ..target-path..
                            :xjc-plugin {:generated-java ..generated-java..}}]
               (plugin/xjc-task project) => irrelevant
               (provided
                 (td/mk-xjc-target-dir ..project-root..
                                       ..target-path..
                                       ..generated-java..)
                 => ..xjc-target-dir..)))
{'fraction_non_alphanumeric': 0.13389121338912133, 'fraction_numerical': 0.001394700139470014, 'mean_word_length': 1.5347467608951708, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6509569', 'n_tokens_mistral': 665, 'n_tokens_neox': 610, 'n_words': 134}