NSubstitute
NSubstitute copied to clipboard
A friendly substitute for .NET mocking libraries.
**Describe the bug** As soon as the readonly struct ``Path`` in the repro below has a call to another ctor the following ``AmbiguousArgumentsException`` is thrown: ```csharp NSubstitute.Exceptions.AmbiguousArgumentsException HResult=0x80131500 Message=Cannot determine...
**Describe the bug** Property getters are not checked inside `Received.InOrder` **To Reproduce** I would expect this test to fail. Nowhere is the substitute's `Count` property called. ``` csharp [Test] public...
I am trying to intercept any call to a generic method, regardless of the used generic argument. I expected that using `Arg.AnyType` as the generic argument would be the way...
This should allow creation of substitute, providing an instance where the substitute will forward all calls to the implemented type(s) members that are also implemented by the type of the...
**Describe the bug** When substituting a method that takes in an argument of type `IEnumerable` where T is an enum, passing in casted arrays returns incorrect results. This is the...
**Is your feature request related to a problem? Please describe.** I often run into the scenario where there is a custom interface I need to substitute which is partially implemented...
**Describe the bug** Tests that use NSubstitute to mock internal members of Trimmable assemblies fail when run on Android, with the following error: > System.ArgumentException : Can not create proxy...
Would be great to get the info from https://github.com/nsubstitute/NSubstitute/pull/705 into the official docs: --- Actually the API you are changing is designed exactly with open/closed principle in mind 😊 It's...