Permalink
Browse files

Support JUnit 4 annotations.

  • Loading branch information...
1 parent ad4138b commit 7b18f35e9e2b699313b52e916133ecf17985bec4 Roman Scherer committed Feb 15, 2013
View
@@ -5,7 +5,7 @@
:min-lein-version "2.0.0"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
- :dependencies [[ant/ant-junit "1.6.5"]
+ :dependencies [[org.apache.ant/ant-junit "1.8.4"]
[lancet "1.0.1"]
- [junit/junit "4.10"]]
+ [junit/junit "4.11"]]
:eval-in-leiningen true)
View
@@ -1,8 +1,8 @@
(defproject sample-project "0.0.1-SNAPSHOT"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.4.0"]]
- :profiles {:dev {:dependencies [[junit/junit "4.10"]]}}
- :plugins [[lein-junit "1.0.4-SNAPSHOT"]]
+ :profiles {:dev {:dependencies [[junit/junit "4.11"]]}}
+ :plugins [[lein-junit "1.1.1-SNAPSHOT"]]
:hooks []
:source-paths ["src/clojure"]
:java-source-paths ["src/java" "test/java"]
@@ -5,7 +5,6 @@
public class SubscriptionTest extends TestCase {
- @Test
public void testGetPricePerMonth() {
Subscription s = new Subscription(200, 2);
assertTrue(s.getPricePerMonth() == 100.0);
@@ -0,0 +1,15 @@
+package com.other;
+
+import com.example.Subscription;
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
+public class SubscriptionTest {
+
+ @Test
+ public void getPricePerMonth() {
+ Subscription s = new Subscription(200, 2);
+ assertTrue(s.getPricePerMonth() == 100.0);
+ }
+
+}
@@ -53,12 +53,19 @@
(deftest test-testcase-fileset
(are [fileset expected]
- (is (= expected (seq (.getIncludedFiles (.getDirectoryScanner fileset)))))
- (testcase-fileset project) ["com/example/SubscriptionTest.class"]
- (testcase-fileset project "com.example") ["com/example/SubscriptionTest.class"]
- (testcase-fileset project "com.example.Subscription") ["com/example/SubscriptionTest.class"]
- (testcase-fileset project "com.example" "com.other") ["com/example/SubscriptionTest.class"]
- (testcase-fileset project "com.other") nil))
+ (is (= (sort expected)
+ (sort (seq (.getIncludedFiles (.getDirectoryScanner fileset))))))
+ (testcase-fileset project)
+ ["com/example/SubscriptionTest.class"
+ "com/other/SubscriptionTest.class"]
+ (testcase-fileset project "com.example")
+ ["com/example/SubscriptionTest.class"]
+ (testcase-fileset project "com.example.Subscription")
+ ["com/example/SubscriptionTest.class"]
+ (testcase-fileset project "com.example" "com.other")
+ ["com/example/SubscriptionTest.class"
+ "com/other/SubscriptionTest.class"]
+ (testcase-fileset project "com.another") nil))
(deftest test-junit-all
(try

0 comments on commit 7b18f35

Please sign in to comment.