NSubstitute 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. 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. We've tried to make the most frequently required operations obvious and easy to use, keeping less usual scenarios discoverable and accessible, and all the while maintaining as much natural language as possible. There are already some great mocking libraries around for .NET, so why create another? We found that for all their great features, none of the existing libraries had the succinct syntax we were craving — the code required to configure test doubles quickly obscured the intention behind our tests.

Features

  • Perfect for those new to testing, and for others who would just like to to get their tests written with less noise and fewer lambdas
  • Simple, succinct, pleasant to use
  • Helpful exceptions
  • Don't sweat the small stuff
  • Just substitute for the type you need
  • NSubstitute is designed for Arrange-Act-Assert (AAA) testing

Project Samples

Project Activity

See All Activity >

Categories

Frameworks, Libraries

License

MIT License

Follow NSubstitute

NSubstitute Web Site

Other Useful Business Software
Compliant and Reliable File Transfers Backed by Top Security Certifications Icon
Compliant and Reliable File Transfers Backed by Top Security Certifications

Cerberus FTP Server delivers SOC 2 Type II certified security and FIPS 140-2 validated encryption.

Stop relying on non-certified, legacy file transfer tools that creak under the weight of modern security demands. Get full audit trails, advanced access controls and more supported by an award-winning team of experts. Start your free 25-day trial today.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of NSubstitute!

Additional Project Details

Programming Language

C#

Related Categories

C# Frameworks, C# Libraries

Registered

2022-09-15