From: Jeff M. <cus...@us...> - 2003-08-11 09:29:40
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects In directory sc8-pr-cvs1:/tmp/cvs-serv20940/src/core/com/mockobjects Modified Files: AbstractExpectationCollection.java ExpectationCollection.java Log Message: Added long support to collections Index: AbstractExpectationCollection.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/AbstractExpectationCollection.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AbstractExpectationCollection.java 18 May 2003 20:59:36 -0000 1.7 +++ AbstractExpectationCollection.java 11 Aug 2003 09:29:37 -0000 1.8 @@ -24,7 +24,7 @@ public void addActualMany(Object[] items) { if(items == null) return; - + for (int i = 0; i < items.length; ++i) { addActual(items[i]); } @@ -96,5 +96,13 @@ "did not receive the expected collection items.", new HashSet(getExpectedCollection()), new HashSet(getActualCollection())); + } + + public void addActual(long actual) { + addActual(new Long(actual)); + } + + public void addExpected(long expected) { + addExpected(new Long(expected)); } } Index: ExpectationCollection.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/ExpectationCollection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ExpectationCollection.java 27 Aug 2001 01:14:31 -0000 1.2 +++ ExpectationCollection.java 11 Aug 2003 09:29:37 -0000 1.3 @@ -14,6 +14,8 @@ void addActual(Object actual); + void addActual(long actual); + void addActualMany(Object[] actuals); void addActualMany(Enumeration actuals); @@ -22,6 +24,8 @@ void addExpected(Object expected); + + void addExpected(long expected); void addExpectedMany(Object[] expectedItems); |