From: Steve F. <sm...@us...> - 2003-09-11 21:37:38
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects In directory sc8-pr-cvs1:/tmp/cvs-serv6981/src/core/com/mockobjects Modified Files: AbstractExpectationCollection.java ExpectationSet.java Log Message: Fixed bug where use of HashSets meant that ExpectationLists didn't verify properly Index: AbstractExpectationCollection.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/AbstractExpectationCollection.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractExpectationCollection.java 11 Aug 2003 09:29:37 -0000 1.8 +++ AbstractExpectationCollection.java 11 Sep 2003 21:37:30 -0000 1.9 @@ -3,7 +3,6 @@ import java.util.Collection; import java.util.Enumeration; import java.util.Iterator; -import java.util.HashSet; abstract public class AbstractExpectationCollection extends AbstractExpectation implements ExpectationCollection { @@ -94,8 +93,8 @@ public void verify() { assertEquals( "did not receive the expected collection items.", - new HashSet(getExpectedCollection()), - new HashSet(getActualCollection())); + getExpectedCollection(), + getActualCollection()); } public void addActual(long actual) { Index: ExpectationSet.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/ExpectationSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ExpectationSet.java 14 May 2003 14:59:34 -0000 1.3 +++ ExpectationSet.java 11 Sep 2003 21:37:30 -0000 1.4 @@ -26,4 +26,12 @@ protected Collection getExpectedCollection() { return myExpectedItems; } + + public void verify() { + assertEquals( + "did not receive the expected collection items.", + new HashSet(getExpectedCollection()), + new HashSet(getActualCollection())); + } + } |