Using Mocks with multiple scenarios in NBehave -


I am using NBehave to write my stories and Rhino Max is used to write system (system).

However, going from one scenario to another, there is a problem resetting the expected behavior in my fake dependency.

I only want to claim that the method of saving on my repository was called in two situations:

  dependencyRepository.AssertWasCalled (ears => ears.sev (Arg & lt; IDependance & gt; .Is.Equal (dependency)))  

But it is being called in every scenario and fails in my second scenario because Rhino Mox It should be said only once, I do not want to be forced to use a clear expression But it sounds a bit like I have.

Rhino Mox has some examples of Nibehave but I can not do many scenarios

Cheers

If you do not want to say that. Save (...) was called in each scenario, then do not set expectation for each scenario, set it only for scenarios where you call it.

If this does not answer your question, please clarify your question with more information; It is not clear what you are trying to do.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -