[Httpunit-commit] CVS: httpunit/src/com/meterware/pseudoserver HttpUserAgentTest.java,1.5,1.6
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-12-26 04:59:38
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv4153/src/com/meterware/pseudoserver
Modified Files:
HttpUserAgentTest.java
Log Message:
Adding support for getElementWithID
Index: HttpUserAgentTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/HttpUserAgentTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- HttpUserAgentTest.java 29 Nov 2002 15:23:41 -0000 1.5
+++ HttpUserAgentTest.java 26 Dec 2002 04:59:35 -0000 1.6
@@ -127,6 +127,15 @@
}
+ protected void assertImplements( String comment, Object object, Class expectedClass ) {
+ if (object == null) {
+ fail( comment + " should be of class " + expectedClass.getName() + " but is null" );
+ } else if (!expectedClass.isInstance( object )) {
+ fail( comment + " should be of class " + expectedClass.getName() + " but is " + object.getClass().getName() );
+ }
+ }
+
+
protected void assertMatchingSet( String comment, Object[] expected, Object[] found ) {
Vector expectedItems = new Vector();
Vector foundItems = new Vector();
|