Top "Nsubstitute" questions

NSubstitute is a .NET mocking framework.

How do I unit test a repository that uses DbContext with NSubstitute?

I have a solution in which I have a Data project that contains an EF6 .edmx file, generated from an …

c# entity-framework unit-testing dbcontext nsubstitute
NSubstitute mock a void method with out parameters

I am new to NSubstitute, I am trying to mock a void method with 2 out parameters and I am pretty …

c# unit-testing testing mocking nsubstitute
Returning the result of a method that returns another substitute throws an exception in NSubstitute

I have run into a weird issue while using NSubstitute a few times and although I know how to work …

c# nsubstitute
How Add test cookie to Request in C# unit test

How I can add test cookie to request so I can test my code from Unit test. Consider a code …

c# asp.net-mvc unit-testing cookies nsubstitute
NSubstitute - Check arguments passed to method

We are currently in the process of moving from RhinoMocks to NSubstitute. I have a method that takes an object …

c# mocking nsubstitute
Example of how to use AutoFixture with NSubstitute

I use NSubstitute a lot. And I love it. I am just looking into AutoFixture. It seems great! I have …

c# .net autofixture nsubstitute
NSubstitute - Testing for a specific linq expression

I am using the repository pattern in an MVC 3 application I am currently developing. My repository interface looks as follows: …

c# unit-testing nsubstitute
NSubstitute to return a Null for an object

I am new to unit testing and it sounds to me like it should be easy to get NSubstitute to …

c# unit-testing nsubstitute
MVC4 Unit test NSubstitute Could not find a call to return from

I have a MVC4 web application I'm unit testing right now. It uses entity framework for the database portion. I'm …

c# asp.net-mvc asp.net-mvc-4 unit-testing nsubstitute
NSubstitute cannot determine argument specifications to use

I use NUnit and NSubstitute for unit testing. I have the following: public interface IDataProvider { void Log(int tvmId, DateTime …

c# mocking nsubstitute