Keyword Analysis & Research: nsubstitute
Keyword Research: People who searched nsubstitute also searched
Search Results related to nsubstitute on Search Engine
-
NSubstitute: A friendly substitute for .NET mocking libraries
https://nsubstitute.github.io/
webNSubstitute is designed for Arrange-Act-Assert (AAA) testing, so you just need to arrange how it should work, then assert it received the calls you expected once you're done. Because you've got more important code to write than whether you need a mock or a stub.
DA: 2 PA: 54 MOZ Rank: 7
-
NSubstitute: Getting started - GitHub Pages
https://nsubstitute.github.io/help/getting-started/
webNSubstitute will work without the analysers installed, but these packages will help detect potential misuses of the NSubstitute API. > Install-Package NSubstitute.Analyzers.CSharp. // or. > Install-Package NSubstitute.Analyzers.VisualBasic. Using NSubstitute in a test fixture copy to clipboard.
DA: 34 PA: 85 MOZ Rank: 4
-
GitHub - nsubstitute/NSubstitute: A friendly substitute for .NET
https://github.com/nsubstitute/NSubstitute
webWhat is it? NSubstitute is designed as a friendly substitute for .NET mocking libraries. It is an attempt to satisfy our craving for a mocking library with a succinct syntax that helps us keep the focus on the intention of our tests, rather than on the configuration of our test doubles.
DA: 8 PA: 48 MOZ Rank: 54
-
Effective Mocking With NSubstitute in .NET - Code Maze
https://code-maze.com/csharp-effective-mocking-with-nsubstitute/
webFeb 26, 2024 · What Is NSubstitute? NSubstitute is a popular mocking framework in .NET, similar to Moq, that simplifies the creation of mock objects for unit testing. With NSubstitute, we can simulate the behavior of dependencies in our tests.
DA: 42 PA: 16 MOZ Rank: 36
-
NSubstitute: Docs and getting help - GitHub Pages
https://nsubstitute.github.io/help.html
webNSubstitute: Docs and getting help. | |. Getting started. Creating a substitute. Setting a return value. Return for specific args. Return for any args. Return from a function. Multiple return values. Replacing return values. Checking received calls. Clearing received calls. Argument matchers. Callbacks, void calls and When..Do. Throwing exceptions.
DA: 15 PA: 59 MOZ Rank: 97
-
A cheat sheet to migrate from Moq to NSubstitute
https://timdeschryver.dev/blog/a-cheat-sheet-to-migrate-from-moq-to-nsubstitute
webAug 13, 2023 · using NSubstitute: new Mock<(.*)>\(\) Substitute.For<$1>() Mock<(.*?)> $1 \.Setup\([\w\s]*=>[\w\s]*(.*)\) $1 \.ReturnsAsync\(.Returns(It\.IsAny: Arg.Any: It\.Is: Arg.Is \.Object (be careful here as it may also replace other non-moq properties) ((\w+)|(\w+\s+))\.Verify\([\w\s]*=>[\w\s]*\.(.*)\)((.*?)), Times.Never\(\)\) await …
DA: 70 PA: 23 MOZ Rank: 28
-
Mocking Dependencies In .NET 7 With NSubstitute - Medium
https://medium.com/@kova98/mocking-dependencies-in-net-7-with-nsubstitute-65c61eafba28
web5 min read. ·. May 13, 2023. Introduction. In this article, I’ll demonstrate how to effectively unit test C# code that has dependencies, substituting them in a way that keeps your tests isolated,...
DA: 84 PA: 56 MOZ Rank: 3
-
Releases · nsubstitute/NSubstitute · GitHub
https://github.com/nsubstitute/NSubstitute/releases
webWe've released NSubstitute v4.4.0. This adds support for Castle Core v5, thanks to @Havunen ( #690, #673 ), as well as fixing an issue checking for constructor args on null object, courtesy of @phongphanq, and @appel1 ( #683, #685 ). Thanks also to @Mandroide for the code review.
DA: 76 PA: 73 MOZ Rank: 10
-
Clean mocking for unit tests using NSubstitute in .NET (Core ... - YouTube
https://www.youtube.com/watch?v=LcQYv0cBWk0
webJan 29, 2020 · 0:00 / 18:31. Clean mocking for unit tests using NSubstitute in .NET (Core, Framework, Standard) Nick Chapsas. 246K subscribers. Join. Subscribed. 838. Share. Save. 35K views 3 years ago...
DA: 61 PA: 22 MOZ Rank: 52
-
NuGet Gallery | NSubstitute 5.1.0
https://www.nuget.org/packages/NSubstitute
webFrameworks. Dependencies. Used By. Versions. NSubstitute is a friendly substitute for .NET mocking libraries. It has a simple, succinct syntax to help developers write clearer tests. NSubstitute is designed for Arrange-Act-Assert (AAA) testing and with Test Driven Development (TDD) in mind.
DA: 41 PA: 12 MOZ Rank: 47