Update of /cvsroot/mockobjects/mockobjects-java/src/core/test/mockobjects/constraint
In directory sc8-pr-cvs1:/tmp/cvs-serv21961/src/core/test/mockobjects/constraint
Modified Files:
Tag: DynamicMockExperiment
ConstraintsTest.java
Log Message:
Test updates for CallSet rename and expectAndReturn modification
Index: ConstraintsTest.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/test/mockobjects/constraint/ConstraintsTest.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- ConstraintsTest.java 7 Apr 2003 14:26:56 -0000 1.1.2.1
+++ ConstraintsTest.java 11 Apr 2003 13:21:16 -0000 1.1.2.2
@@ -8,10 +8,9 @@
import java.util.EventObject;
+import junit.framework.*;
-
-public class ConstraintsTest
- extends junit.framework.TestCase
+public class ConstraintsTest extends TestCase
{
class True implements Constraint {
public boolean eval( Object o ) { return true; }
@@ -52,6 +51,12 @@
assertTrue( p.eval( new Integer(1) ) );
assertTrue( !p.eval(i2) );
}
+
+ public void testIsEqualEquals() throws Exception {
+ assertEquals("Should be equal", new IsEqual("a"), new IsEqual("a"));
+ assertFalse("Should not be equal - same type", new IsEqual("a").equals(new IsEqual("b")));
+ assertFalse("Should not be equal - different type", new IsEqual("a").equals("b"));
+ }
public void testIsGreaterThan() {
Constraint p = new IsGreaterThan( new Integer(1) );
|