CVS: junit/src/org/junit/tests AssumptionTest.java, 1.1, 1.2 AllTests.java, 1.12, 1.13

David Saff <[email protected]> Fri, 06 Jul 2007 09:04:11 -0700
Newsgroups gmane.comp.java.junit.devel
Message-ID <[email protected]>
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;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/