Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/test
In directory usw-pr-cvs1:/tmp/cvs-serv11331/src/core/com/mockobjects/test
Modified Files:
TestExpectationValue.java
Log Message:
Added setExpected(double) & setActual(double) to ExpectationValue
Index: TestExpectationValue.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/test/TestExpectationValue.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestExpectationValue.java 29 Jul 2001 19:50:24 -0000 1.1
+++ TestExpectationValue.java 23 Aug 2002 14:43:33 -0000 1.2
@@ -129,6 +129,27 @@
myExpectation.verify();
}
+ public void testDoubleFail() {
+ myExpectation.setExpected(100.0);
+
+ boolean testPasses = false;
+ try {
+ myExpectation.setActual(150.0);
+ } catch (AssertionFailedError ex) {
+ testPasses = true;
+ }
+
+ assertTrue("Should fail fast on double", testPasses);
+ }
+
+ public void testDoublePass() {
+ myExpectation.setExpected(100.0);
+
+ myExpectation.setActual(100.0);
+
+ myExpectation.verify();
+ }
+
public void testNullFail() {
myExpectation.setExpected(null);
|