Welcome! Please see the About page for a little more info on how this works.

0 votes
in java.data by

In this example the last test fails.

I have used org.codehause.mojo.rpm.Mapping(link: 1) as the example as this is where I discovered the bug.

(link: 1) http://mojo.codehaus.org/rpm-maven-plugin/apidocs/org/codehaus/mojo/rpm/Mapping.html


(use 'clojure.java.data


(import '(link: org.codehaus.mojo.rpm Mapping))

(testing "setting normally"

(let (link: mapping (Mapping.))

	(.setConfiguration mapping "a value")
	(.setDirectory mapping "/tmp")

	(is (= (.getDirectory mapping) "/tmp"))
	(is (= (.getConfiguration mapping) "a value"))))

(testing "setting via java-data"

(let (link: mapping (to-java Mapping {:configuration "a value" :directory "/tmp"}))
  (is (= (.getDirectory mapping) "/tmp"))
  (is (= (.getConfiguration mapping) "a value")))))

1 Answer

0 votes