NSubstitute
NSubstitute copied to clipboard
A friendly substitute for .NET mocking libraries.
The issue is based on the discussion in #559. @zvirja > should we probably modify CI so that doc is published automatically on push to master? This way if we...
NSubstitute already allows powerful assertion that calls were made. However that's only part of the problem. If can also be useful to check that other calls _haven't_ happened. For smaller...
Hi, I have used this functionality in mockito in Java and I miss it in NSubstitute. As far as I know, NSub does not provide a way to achieve it....
Not quite sure if this should go here or somewhere else... Function Returns with a lambda expression doesn't work with lambda expression parameters [as Moq does](https://www.brainarama.com/thought/6f67f9c0-9009-11e7-a7ed-616da4ad9af5/Moq-Use-Setup-arguments-parameters-in-the-Returns-of-a-mocked-function). Like in the link,...
As per [group comment](https://groups.google.com/forum/#!topic/nsubstitute/6xWMbtwuvMM), it might be nice to offer a single page / pdf version of the help website. Could look at another template that generates all the posts...
``` using System; using NSubstitute; public interface ITest1{ Test1 Get(); } public class Test1{ } public interface ITest2{ Test2 Get(); } public class Test2{ public int X; } public interface...
**Is your feature request related to a problem? Please describe.** Nsubstitute documentation site https://nsubstitute.github.io currently doesn’t have link to provide easy feedback about documentation. E.g. I noticed a small mistake...
**Describe the bug** `Arg.Is` seems to override behavior of `Arg.Any` for recursive mocks. **To Reproduce** ```csharp namespace ConsoleApp1 { using System; using NSubstitute; class Program { static void Main(string[] args)...
As raised in #449, it would be useful to support property getters in `When..Do`: ```csharp // Current syntax: sub.When(x => { _ = x.Prop; }).DoNotCallBase(); // Proposed: sub.When(x => x.MyProp).DoNotCallBase();...
**Describe the bug** NSubstitute is calling base methods even during a configure overidden call when the target member is internal **To Reproduce** ``` // FAILS [Fact] public void TestInternalCall() {...