From: Barry K. <bk...@in...> - 2002-11-19 20:28:29
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body> Nat Pryce wrote:<br> <blockquote type="cite" cite="mid...@ba..."> <pre wrap="">On Tue, 2002-11-19 at 17:30, Barry Kaplan wrote: </pre> <blockquote type="cite"> <pre wrap="">Nat Pryce wrote: </pre> <blockquote type="cite"> <pre wrap="">The Constraints do not have any knowledge of the class of the object being constraint, except for the IsInstanceOf constraint, which is a special case. </pre> </blockquote> <pre wrap="">But they have the object being constrained. The object knows its Class. Am I missing something? </pre> </blockquote> <pre wrap=""><!----> The MockCall object passes the method arguments to the constraints when it is called. Each constraint returns true if the argument that it is checking meets the constraint or false if it doesn't. If any constraint returns false, the MockCall throws an AssertionFailedError. </pre> </blockquote> Sorry, what I meant say was that MockCall has an object with which to do the comparison against the actual call arguments. From those objects we can get the class. But as you pointed out, some MockCall's take no object to compare with, because they do no comparison. For MockCall to resolve the actual call argument Class's, those MockCall's would need to take a Class as a psuedo comparison argument. A bit of a smell, I agree.<br> <br> -bk<br> <br> </body> </html> |