Retired: Will autoupdate to use the XunitShould.Sources package instead.
Package Description
This is a meta package to lock FluentAssertions to version 7.x due to licensing concerns in later versions. This ensures you remain on a free and open-source version.
Galosoft.IaaS快速开发库
Glue to allow NSubstitute to use Fluent Assertions when verifying received calls.
FakeIteasy.DotnetCore.LoggerExtensions provides a simple way to assert calls to a logger happened using two simple to use extension methods.
Method Chaining base UnitTesting Extension Methods and Dynamic Private Accessor for xUnit.net.
Retired: Will autoupdate to use the XunitShould.Sources package instead.
Atc.Rest.FluentAssertions is a collection of assertion helpers for writing tests of Atc types.
Provides additional assert capabilities for MS Test.
The library is an extensions for validating a json documents in Fluent assertions
Enhancements and utility classes for primitive types and some commonly used types in the mscorlib and System.Core libraries. Extension methods are available for string, DateTime, enum, StringBuilder, SecureString, RegEx, event handlers, random, array, Enumberable, IList, collections, stream and various derivatives. Utility classes include the SortUtility class for topological sorting, the Assert class for argument validation, and FastConvert class for performance optimized serialization between various primitive types and string. Also include various utility classes for DateTime, enum, HTTP, mathematics, random and string. A ConcurrentSortedList generic collection type is implemented in this library, which expands on the SortedList type to support multi-threading.
Method Chaining base UnitTesting Extension Methods and Dynamic Private Accessor for NUnit.
ExceptionAssert for MSTest to test for exception throws
This package provides a set of extensions to FluentAssertions to simplify the testing of project using CSharpFunctionalExtensions
A set of helpers and asserts for unit and functional tests
FluentAssertions extensions for ITLibrium.Bdd
Retired: Will autoupdate to use the XunitShould.Sources package instead.
A .NET library that provides helpers for using Moq on top of the ChannelAdam.TestFramework.
This package contains a useful collection of pre and post condition assertion extension methods and a fluent-like approach to throwing exceptions based on a given condition or custom predicate.
LucidCode is a library dedicated to improving code readability. The library contains following extension methods: In / NotIn, IsNull / IsNotNull, ToNullIfEmpty, ToNullIfWhiteSpace LucidTest is set of classes to support Arrange Act Assert pattern Full documentation is available here: https://github.com/csharp-today/LucidCode
Contains Verify - fast and extensible class for simple method arguments asserts. Example: Verify.Args(new { param1, param2 }).NotNull()
*TestBase* gives you a flying start with - fluent assertions that are easy to extend - sharp error messages - tools to help you test with “heavyweight” dependencies on - AspNetCore.Mvc, AspNet.Mvc or WebApi Contexts - HttpClient - Ado.Net - Streams & Logging Chainable fluent assertions get you to the point concisely: ``` ControllerUnderTest.Action() .ShouldbeViewResult() .ShouldHaveModel<TModel>() .ShouldEqualByValue(expected, exceptForTheseFields); .Reference .ShouldMatchIgnoringCase("I expected this"); ControllerUnderTest.Action() .ShouldBeRedirectToRouteResult() .ShouldHaveRouteValue(""expectedKey"", [Optional] ""expectedValue""); ShouldHaveViewDataContaining(), ShouldBeJsonResult() etc. ``` Quickly test AspNetCore controllers with zero setup using `controllerUnderTest.WithControllerContext()` : ``` [TestFixture] public class WhenTestingControllersUsingFakeControllerContext { [Test] public void ControllerUrlAndOtherPropertiesShouldWorkAsExpected__GivenControllerContext() { var uut = new FakeController().WithControllerContext(); uut.Url.Action(""a"", ""b"").ShouldEqual(""/b/a""); uut.ControllerContext.ShouldNotBeNull(); uut.HttpContext.ShouldBe(uut.ControllerContext.HttpContext); uut.Request.ShouldNotBeNull(); uut.ViewData.ShouldNotBeNull(); uut.TempData.ShouldNotBeNull(); uut.MyAction(param) .ShouldBeViewResult() .ShouldHaveModel<YouSaidViewModel>() .YouSaid.ShouldBe(param); } [Test] public void ShouldBeAbleToUseServicesConfiguredInStartupInTests() { var moreServicesFromDI=TestServerBuilder.RunningServerUsingStartup<TStartup>().Host.ServiceProvider; var controllerUnderTest = new AController() .WithControllerContext(virtualPathTemplate:""/{Action}/Before/{Controller}""); var result= controllerUnderTest .Action(""SomeController"",""SomeAction"") .ShouldBeViewWithModel<AClass>(""ViewName""); .FooterLink .ShouldBe(""/SomeAction/Before/SomeController""); } } ``` ... Or test against complex application dependencies using `HostedMvcTestFixtureBase` and specify your `Startup` class: ``` [TestFixture] public class WhenTestingControllersUsingAspNetCoreTestTestServer : HostedMvcTestFixtureBase { [TestCase(""/dummy/action?id={id}"")] public async Task Get_Should_ReturnActionResult(string url) { var id=Guid.NewGuid(); var httpClient=GivenClientForRunningServer<Startup>(); GivenRequestHeaders(httpClient, ""CustomHeader"", ""HeaderValue1""); var result= await httpClient.GetAsync(url.Formatz(new {id})); result .ShouldBe_200Ok() .Content.ReadAsStringAsync().Result .ShouldBe(""Content""); } [TestCase(""/dummy"")] public async Task Put_Should_ReturnA(string url) { var something= new Fixture().Create<Something>(); var jsonBody= new StringContent(something.ToJSon(), Encoding.UTF8, ""application/json""); var httpClient=GivenClientForRunningServer<Startup>(); GivenRequestHeaders(httpClient, ""CustomHeader"", ""HeaderValue1""); var result = await httpClient.PutAsync(url, jsonBody); result.ShouldBe_202Accepted(); DummyController.Putted.ShouldEqualByValue( something ); } } ``` See also - TestBase - TestBase.Mvc for Mvc4 and Mvc 5 - TestBase.HttpClient.Fake - TestBase.AdoNet - Serilog.Sinks.ListOfString - Extensions.Logging.ListOfString
An assertion library for use with CDK Apps (Stability: Experimental)
Package Description
General utilities for using FluentAssertions with xUnit.net.
Write easy fluent preconditions in methods of your code. The library is provided as it is. Use at your own risk.
XAssert is a test runner agnostic assertion framework for .NET. It is set of portable class libraries compatible with .NET 4+, Silverlight 5+, Windows 8+ and Windows Phone 8+
This project provides an API to implement custom assertions. Currently, the only implementation is based on MSTest.
This package provides extensions to FluentAssertions for the Functional.Unions package.
Adds BDD .Should() assertion syntax to NUnit
Client helper for OAuth2 2-legged flows with client secret and JWT client assertion support and token caching
Ergonomic Assertions for .NET
**SystemTestingTools** (for .net core 3.1+) extends your test capabilities, providing ways to create / return stubs, allowing you to run more comprehensive / deterministic / reliable tests in your local dev machine / build tool and in non-prod environments. * supporting interception of Http (HttpClient or WCF) calls: * before they are sent, returning stubs (ideal for automated testing) * after they are sent, where you can save the request and response (recording), log appropriately or replace bad responses by stubs (ideal for dev/test environments that are flaky or not ready) * asserting outgoing calls (ie: making sure out downstream calls have SessionIds) * intercept logs and run asserts on them
This library helps you implementing your unit tests following the 4-A, "AAAA" or Arrange-Assume-Act-Assert philosophy, with Xunit.
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit test. PCL for .NET45, SL4+, WP7+, Xamarin.iOS, Xamarin.Android, Xamarin.Mac. Supports the unit test frameworks NUnit, NUnitLite, XUnit, MBUnit and MSpec.
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.
A .NET library for working with a tree of objects.
A assertion extensions of FluentResults for Nut.Results
Fluent Constructor Assertions is a Fluent API for testing constructors in C#. The goal of this library is to make testing all those pesky `ArgumentNullExceptions` being thrown around when instantiating classes just a bit easier and less time intensive.
XMLUnit provides you with the tools to verify the XML you emit is the one you want to create. It provides helpers to validate against an XML Schema, assert the values of XPath queries or compare XML documents against expected outcomes.