I want to create a stub of the following interface: interface IUnitOfWork { void DoInTransaction(Action method);
W开发者_运维技巧hat\'s the difference between mocking classes and interfaces in Rhino Mocks?You can\'t mock concrete classes per se, unless the class is abstract or has virtual methods. You can fake t
How do you use Rhino Mocks to insert a value into an action? Register() takes an action that is assigned to a local variable that is used later in the function:
I have a Data Service interface with a method: void GetDataByLocationId(Guid locationId, Action<InvokeOperation<IEnumerable<DataValue>>> callback);
I try to Mock (with Rhyno mock) the behaviour of a assynchronous service. Here is an example: I got a service with one methode called 开发者_如何转开发void GetServerState(). As this method is assynch
Given the following streamlined example, using RhinoMocks and MSpec: [Subject(typeof (LocationController))]
I need to do something that seems quite simple, but I cant seem to achieve it. I need to be able to write a unit test that calls the action and filter delegates of any subscription to an eventaggrega
I\'m reading this MSDN Article about MVVM. I\'m currently looking at the RelayCommand in figure #15. Pretend I wanted to test this SaveCommand. How开发者_运维技巧 would I do that? I\'m using NUnit and
We\'re currently facing some issues during Unit Testing. Our class is multithreading some function calls on Mocked objects using Rhino Mocks. Here\'s a example reduced to the minimum:
I am using Rhino Mocks and I\'m not sure how to mock a call that takes a lambda expression.Here\'s the situation: