I don't know if there's a better way, but I think the following should work:

Setup a Stub for End() with a WhenCalled() that does something that means
any further calls on the mock will fail. I should think calling
mockObject.VerifyAllExpectations() should probably work... although you'd
need to verify this.

On 6 October 2010 12:22, k0v1d pa9d3y <pandeyko...@gmail.com> wrote:

> How do i make sure that after the particular method called up no other
> method/ property setter should be called on the same object.
>
> Let say I have a method which has three methods,
>
> Start()
> DoSomeProcess1()
> DoSomeProcess2()
> DoSomeProcess1()
> //Some property settings...
> .....
> End(),
>
> I want to make sure that End() should always be executed at last, no other
> method should be executed once End gets executed?
>
> How can I achieve this using Rhinomock();
>
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Rhino.Mocks" group.
> To post to this group, send email to rhinomo...@googlegroups.com.
> To unsubscribe from this group, send email to
> rhinomocks+unsubscr...@googlegroups.com<rhinomocks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rhinomocks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to rhinomo...@googlegroups.com.
To unsubscribe from this group, send email to 
rhinomocks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to