Update of /cvsroot/junit/junit/src/org/junit/experimental/theories/test/results
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv28163/src/org/junit/experimental/theories/test/results
Modified Files:
ResultMatchersTest.java PrintableResultTest.java
Log Message:
No tests rely on hamcrest-all
Index: ResultMatchersTest.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/experimental/theories/test/results/ResultMatchersTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ResultMatchersTest.java 2 Jul 2007 18:10:57 -0000 1.1
+++ ResultMatchersTest.java 9 Jul 2007 18:49:21 -0000 1.2
@@ -1,13 +1,11 @@
package org.junit.experimental.theories.test.results;
import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.hasToString;
import static org.junit.Assert.assertThat;
-import org.hamcrest.Matchers;
+import static org.junit.experimental.theories.matchers.api.StringContains.containsString;
import org.junit.Test;
import org.junit.experimental.results.ResultMatchers;
import org.junit.experimental.theories.methods.api.Theory;
-
public class ResultMatchersTest {
@Test
public void hasFailuresHasGoodDescription() {
@@ -18,6 +16,6 @@
@Theory
public void hasFailuresDescriptionReflectsInput(int i) {
assertThat(ResultMatchers.failureCountIs(i).toString(),
- hasToString(Matchers.containsString("" + i)));
+ containsString("" + i));
}
}
Index: PrintableResultTest.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/experimental/theories/test/results/PrintableResultTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PrintableResultTest.java 2 Jul 2007 18:10:57 -0000 1.1
+++ PrintableResultTest.java 9 Jul 2007 18:49:21 -0000 1.2
@@ -1,12 +1,12 @@
package org.junit.experimental.theories.test.results;
import static java.util.Arrays.asList;
-import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.CoreMatchers.allOf;
import static org.junit.Assert.assertThat;
+import static org.junit.experimental.theories.matchers.api.StringContains.containsString;
import java.util.Arrays;
-import org.hamcrest.Matchers;
import org.junit.experimental.results.PrintableResult;
import org.junit.experimental.theories.methods.api.Theory;
import org.junit.experimental.theories.runner.api.Theories;
@@ -32,8 +32,7 @@
});
assertThat(new PrintableResult(asList(failure)).toString(), allOf(
- Matchers.containsString(descriptionName), Matchers
- .containsString(stackTraceClassName)));
+ containsString(descriptionName), containsString(stackTraceClassName)));
}
public static String SHELL_POINT= "Shell Point";
@@ -45,7 +44,6 @@
new RuntimeException("firstException")), new Failure(
Description.createSuiteDescription("secondName"),
new RuntimeException(secondExceptionName))));
- assertThat(backtrace.toString(), Matchers
- .containsString(secondExceptionName));
+ assertThat(backtrace.toString(), containsString(secondExceptionName));
}
}
|