Update of /cvsroot/junit/junit/src/org/junit/tests
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv17617/src/org/junit/tests
Modified Files:
AssumptionTest.java AllTests.java
Log Message:
Tests pass without hamcrest-library
Index: AssumptionTest.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/tests/AssumptionTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- AssumptionTest.java 2 Jul 2007 18:11:09 -0000 1.1
+++ AssumptionTest.java 6 Jul 2007 16:04:09 -0000 1.2
@@ -1,14 +1,12 @@
package org.junit.tests;
-import static org.hamcrest.CoreMatchers.*;
-import static org.hamcrest.Matchers.is;
+import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
import static org.junit.Assume.assumeNoException;
import static org.junit.Assume.assumeNotNull;
import static org.junit.Assume.assumeThat;
+import static org.junit.experimental.theories.matchers.api.StringContains.containsString;
-
-import org.hamcrest.Matchers;
import org.junit.Assume;
import org.junit.Test;
import org.junit.Assume.AssumptionViolatedException;
@@ -86,12 +84,11 @@
Object[] objects= { 1, 2, null };
assumeNotNull(objects);
} catch (AssumptionViolatedException e) {
- assertThat(e.getMessage(), Matchers.containsString("1, 2, null"));
+ assertThat(e.getMessage(), containsString("1, 2, null"));
} catch (Exception e) {
fail("Should have thrown AssumptionViolatedException");
}
}
-
@Test
public void assumeNoExceptionThrows() {
final Throwable exception= new NullPointerException();
Index: AllTests.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/tests/AllTests.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- AllTests.java 2 Jul 2007 18:11:09 -0000 1.12
+++ AllTests.java 6 Jul 2007 16:04:09 -0000 1.13
@@ -2,6 +2,8 @@
import junit.framework.JUnit4TestAdapter;
import junit.framework.Test;
+import org.hamcrest.CoreMatchers;
+import org.hamcrest.core.AllOf;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
|