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

**Question** Please excuse my dumb question, i'm just starting with testing. I have a controller IActionResult method, what returns a OK or BadRequest. The Unitverse Extension helped me and generates...

**Question** The ICall interface provides information about recorded calls, but does not contain the return value for non-void method calls. Is it also possible to record/retrieve the return value(s) from...

**Is your feature request related to a problem? Please describe.** I configure and use the same mock across a test collection and some tests needs to mutate that mock to...

feature-request

Hi, v5.2.0 was released but nuget still has 5.1.0 as latest please, upload 5.2.0 to nuget Thank you @dtchepak @alexandrnikitin

Added a release build on tag. Example: https://github.com/dtchepak/NSubstitute/actions/runs/8864632563 (with minor tweak to build-on-push for testing).

**Describe the bug** It seems nsubstitute records all calls by reference rather than cloning the object. **To Reproduce** Run the XUnit test below. **Expected behaviour** All tests should pass. Or...

When trying to test an asynchronous event handler with Raise.Event, the Raise.Event immediately returns on the first thread change in the asynchronous event handler. This makes testing the behaviour of...

# Changes - add dependabot for this project for automatic minor and patch updates - for nuget packages - github actions See examples PR on what will be raised in...

Hi, I really like this project! I notice that there are many issues that could perhaps be closed. That is sometimes confusing because you no longer know what is planned...

Demo for https://github.com/nsubstitute/NSubstitute/issues/803 ![image](https://github.com/nsubstitute/NSubstitute/assets/5808377/1cd35b8b-ed23-44bf-8835-4b39a457f5ec) This give a CouldNotSetReturnDueToNoLastCallException