public class MyClass:IComparable
{
public int CompareTo(object obj)
{
return 0;
}
}
public class MyInterceptor:IInterceptor
{
public void Intercept(IInvocation invocation)
{
invocation.ReturnValue = 1;
}
}
[TestFixture]
public class MyTest : BasePEVerifyTestCase
{
[Test]
public void My_Method()
{
var interceptor = new MyInterceptor();
var proxied = generator.CreateClassProxy(typeof (MyClass), new
Type[] {typeof (IComparable)}, interceptor) as IComparable;
Assert.That(proxied, Is.InstanceOf(typeof (MyClass)));
var result=proxied.CompareTo(null);
Assert.That(result,Is.EqualTo(1));
}
}
Green!
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike
On Fri, Jul 3, 2009 at 5:39 PM, Kenneth Xu <[email protected]> wrote:
>
> Cool, Thanks!
>
> On Fri, Jul 3, 2009 at 10:36 AM, Tuna Toksoz<[email protected]> wrote:
> > Let me check.
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---