Found 38 packages
A picture's worth a 1000 tests. Unit testing asserts can be difficult to use. Approval tests simplify this by taking a snapshot of the results, and confirming that they have not changed.
Common helper classes developed with ApprovalTests
A ApprovalTests.Net reporter and approver to be used to unit test Neo4j with the Neo4jClient .net client
WPF extensions for ApprovalTests.
Utilities for approval object using StatePrinter (https://github.com/kbilsted/StatePrinter). For example: StatePrinterApprovals.Verify(turtle);
Unit tests will often need to assert that a sizeable amount of data matches an expectation, and this is difficult with only the traditional style of assertion. You essentially have the choice of writing a long list of simple assertions, or concatenating the output into a string and using a single assert against that. However, when these assertions fail it can be very hard to determine in what ways the output differs from the expectation. One solution to this problem is a different workflow from traditional unit testing - instead of making a prediction in the code, and then checking the output against the prediction, what if you formatted the output and displayed it side by side with the last "approved" version. This is what TestConsole.Core provides. On a build server, when the test result does not match the default behaviour is just to fail the test, whereas on a development PC you can configure the library to use an installed file compare utility to display the differences. If the differences are expected, you can copy the new result over to the approved version and the test will pass. TestConsole.Core inherits all of the formatting capabilities from the original TestConsole project, and adds test approval features. Users of ApprovalTests will recognise the workflow and the functionality, but at the time of publishing, ApprovalTests is full framework only, whereas TestConsole.Core is intended to allow testing in both full framework and .NET core test suites. I did not set out to build an alternative to ApprovalTests, but I need to be able to test netcoreapp code, and the conversion of TestConsole was not difficult. However, ApprovalTests did not support netstandard or netcoreapp test suites and I couldn't wait any longer, so I built the subset of ApprovalTests features that I needed into TestConsole.Core from scratch. As a result, the syntax is a little different to ApprovalTests, particularly where it relates to selecting a file compare tool, and also relating to what can be directly approved. The intention of the test approval features is to allow data formatted using the TestConsole Output object to be approved, and I've also extended it to handle any plain text.
Utilities for approval testing Windows Forms. Allows screenshot verification of Windows Forms. For example: WinFormsApprovals.Verify(new Button { BackColor = Color.LightBlue, Text = "Help" });
Formerly known as SpecFlow.Reporting.ApprovalTestSuite: Approval test suite which can be used to test reporters
Utilities for approval testing Rdlc Reports. Allows Rdlc image verification and utilities to populate datasets. For example: RdlcApprovals.VerifyReport("YourReport.rdlc", new YourDataTable().AddTestDataRows(1));
Utilities for unit testing Asp and Asp.Mvc views and routes.
Utilities to use at runtime with EntityFramework to enable more tesable code. Use the ApprovalTests.EntityFramework nuget in your tests.
Easy way to tests queries generated by EntityFramework.
Easy way to tests queries generated by NHibernate. General concept here: http://blog.approvaltests.com/2009/04/approving-weather.html
Utilities for unit testing Asp WebApi Projects. Builds on ApprovalTests
An image reporter to be used with ApprovalTests.Net
A simple diff comparison asserter that makes it easy to assert if two texts (strings) are equal, and display the differences in a diff tool if they are not. Simply put it is a much simpler (and dumber) version of ApprovalTests that should get the job done for simple scenarios. You can easily create a file that contains the expected result (your specification or example) and then compare the contents of the file with the actual value that is produced during the test. A new addition is the ability to compare objects wihout using files. It is an extension of FluentAssertions that allows comparison and exclusion of complex objects.
Utilities for unit testing Asp and Asp.Mvc views and routes.
Helper classes that simplifies testing when using ApprovalTests
Diffa is a .netstandard unit-test assertion library that allows you to verify your test results against approved files. Inspired by [ApprovalTests](https://github.com/approvals/ApprovalTests.Net), Diffa will also automatically launch your favorite diff tool when an assertion fails so you can compare approve the results. ## Basic Use [TestClass] [SaveFilesAt("Approved/")] [Use(typeof(DiffReporter))] public class UnitTests [TestMethod] public void Ensure_results_is_well_formed() => Diff.Approve("This is my test results.");
ApprovalTests extension that normalizes pdfs to allow for better pdf verification