NSubstitute icon indicating copy to clipboard operation
NSubstitute copied to clipboard

A friendly substitute for .NET mocking libraries.

Results 178 NSubstitute issues
Sort by recently updated
recently updated
newest added

I don't know if I'm just missing how you do this, but I'm testing that my method is calling a substituted class with a parameter that has a property with...

feature-request

Update build.fsx to run acceptance tests against .net core build (should also run checks against code in documentation? Can split this into a separate task if required.)

``` public class Issue56_NestedPropertyCalls { public interface IFoo { string StringProperty { get; set; } } [Test] public void Nested_calls_to_properties() { const string expectedResult = "asldkfjdlkfj dslkfj"; var sub0 =...

bug

Split from #75. [Example](https://github.com/nsubstitute/NSubstitute/blob/master/Source/NSubstitute.Acceptance.Specs/FieldReports/Issue75_DoesNotWorkWithMembersThatUseDynamic.cs#L57): ``` csharp [Test] [Pending, Explicit] public void AnotherTest() { // Adapted from: http://stackoverflow.com/questions/13182007/nsubstitute-mock-generic-method/ var settingsUtil = Substitute.For(); // This works: //SubstituteExtensions.Returns(settingsUtil.GetConfig("maxImageSize", Arg.Any()), 100L); // This fails,...

Just link to feed from github downloads.

Reported on the [mailing list](http://groups.google.com/group/nsubstitute/browse_thread/thread/e66044d40ee4b79a). ``` csharp using NSubstitute; using System; using System.IO; using System.Runtime.Serialization.Formatters.Binary; namespace SerializeNSubstitute { class Program { static void Main(string[] args) { var root = Substitute.For();...

I would like to mock an interface which features a [default interface method (introduced in C#8)](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/default-interface-methods). However, it seems like the default interface method also gets mocked away, so in...

feature-request

It would be nice to have the possibility to specify that any calls to the mock not specifically implemented will throw an exception. I imagine this could be achieved through...

NSubstitute **ver. 2.0.3** (This is old version) I need use old version . becuase my project not support **c# 4.0** yet. I want to use NSubstitute, ForPartsOf API , and...

**Is your feature request related to a problem? Please describe.** I've found in the past that when a mocked interface takes a large object it can make the verification of...

feature-request