public class MyDoc
{
public virtual String HelloString { get; set; }
public MyDoc(String string1, object object2)
{
}
}
HTH
m.
Erm... I suggest you start by reading the documentation. It really is
very helpful.
You must either make HelloString virtual, (or have it as part of an
interface) before you can use it in a mock call... just as the exception
is telling you.
In a "real world" application, it is likely that you would want an
IDocument (or similar) interface which MyDoc implements and Class2
consumes. That way you can easily verify both the implementation of
MyDoc, and the operation of Class2 in your unit testing. (Note: In that
scenario, you would only benefit from using RhinoMocks, or any mock
object framework, for testing Class2.)
Regards,
Richard
-----Original Message-----
From: Rhino...@googlegroups.com [mailto:Rhino...@googlegroups.com]
On Behalf Of Time
thanking you in anticipation
* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.