rhino
You can subscribe to the rhino tag micro-feed.
The long and short of this article is that I tried out a whole load of mocking frameworks and decided I liked NSubstitute the best. This is currently a reasonably simple decision, because on the whole, Moq, FakeItEasy, Rhino, JustMock and many others besides are all essentially syntactical best friends. There may be some minor […]
This is something that can take a little figuring out – using Rhino Mocks to mock a DbContext and the associated IDBSets. Because of this, I created a little generic method that helps a lot… private static IDbSet<T> GetDbSetTestDouble<T>(IList<T> data) where T : class { IQueryable<T> queryable = data.AsQueryable(); IDbSet<T> dbSet = MockRepository.GenerateMock<IDbSet<T>, IQueryable>(); dbSet.Stub(m […]
If you are calling a service via a service proxy, how do you mock the service call and ensure it was called with the correct parameters? Here is an example using Rhino Mocks to capture the call via the proxy and then test that it is the correct call. namespace Fenton.Example { public class ExampleClass […]