All Projects → approvals → Approvaltests.net

approvals / Approvaltests.net

Licence: other
ApprovalTest verification library for .Net

Projects that are alternatives of or similar to Approvaltests.net

awesome-media
My favorite podcasts and youtube channels
Stars: ✭ 13 (-97.1%)
Mutual labels:  podcast
Awesome Learning Resources
🔥 Awesome list of resources on Web Development.
Stars: ✭ 3,928 (+776.79%)
Mutual labels:  podcast
Castero
TUI podcast client for the terminal
Stars: ✭ 375 (-16.29%)
Mutual labels:  podcast
podsearch bot
Telegram bot that searches Podcast in iTunes store.
Stars: ✭ 28 (-93.75%)
Mutual labels:  podcast
Gatsby Themes
Gatsby themes for blazing fast sites. We are working on the next version of the Flex theme. See https://github.com/reflexjs/reflexjs
Stars: ✭ 275 (-38.62%)
Mutual labels:  podcast
Awesome Russian It
📖 🎧 📺 📆 Список полезных русскоязычных ресурсов, связанных с ИТ
Stars: ✭ 323 (-27.9%)
Mutual labels:  podcast
TechFusionFM
Static site for tech podcast built using Hexo.io with deployment script, XML escaper and iTunes rank tracking Telegram bot.
Stars: ✭ 20 (-95.54%)
Mutual labels:  podcast
Android Dev Sources
All those Android development sources that you need to be and stay awesome!
Stars: ✭ 434 (-3.12%)
Mutual labels:  podcast
Snapguidist
Snapshot testing for React Styleguidist
Stars: ✭ 287 (-35.94%)
Mutual labels:  snapshot-testing
Webdevscom
😍 All kinds of resources for Developers 🔱 in one place.
Stars: ✭ 364 (-18.75%)
Mutual labels:  podcast
GFontsSpace
Preview: https://pankajladhar.github.io/GFontsSpace
Stars: ✭ 88 (-80.36%)
Mutual labels:  snapshot-testing
django-radio
RadioCo is a radio management application that makes easy scheduling, live recording, publishing...
Stars: ✭ 26 (-94.2%)
Mutual labels:  podcast
Bxjs Weekly
BxJS Weekly news podcast links collection
Stars: ✭ 326 (-27.23%)
Mutual labels:  podcast
reducer-tester
Utilities for testing redux reducers
Stars: ✭ 19 (-95.76%)
Mutual labels:  snapshot-testing
Bunit
A testing library for Blazor Components. You can easily define components under test in C# or Razor syntax and verify outcome using semantic HTML diffing/comparison logic. You can easily interact with and inspect components, trigger event handlers, provide cascading values, inject services, mock IJSRuntime, and perform snapshot testing.
Stars: ✭ 415 (-7.37%)
Mutual labels:  snapshot-testing
podpodge
Convert YouTube playlists to audio-only RSS feeds for podcast apps to consume.
Stars: ✭ 32 (-92.86%)
Mutual labels:  podcast
Ultimate Python Resource Hub
The Ultimate resource hub of Python: All at one place
Stars: ✭ 298 (-33.48%)
Mutual labels:  podcast
Phpunit Snapshot Assertions
A way to test without writing actual test cases
Stars: ✭ 443 (-1.12%)
Mutual labels:  snapshot-testing
Snap.swift
Snapshot testing in a snap 🎨
Stars: ✭ 420 (-6.25%)
Mutual labels:  snapshot-testing
Podcastgenerator
Open Source Podcast Publishing Solution since 2006
Stars: ✭ 344 (-23.21%)
Mutual labels:  podcast

ApprovalTests

Build status License NuGet Status Backers on Open Collective Sponsors on Open Collective

Capturing Human Intelligence - ApprovalTests is an open source assertion/verification library to aid unit testing.

It is compatible with most .Net unit testing frameworks (Nunit, MsTest, xUnit, MBUnit)

Contents

What can it be used for?

Approval Tests can be used for verifying objects that require more than a simple assert. They also come prepackaged with utilities for some common .Net scenarios including:

Video Tutorials

You can watch a bunch of short videos on getting started and using ApprovalTests in .Net at YouTube

Podcasts

If you prefer auditory learning, you might enjoy the following podcast

Docs

Available on NuGet

Install-Package ApprovalTests

Examples

Verifying a List

[UseReporter(typeof(VisualStudioReporter))]
[TestFixture]
public class SampleTest
{
    [Test]
    public void TestList()
    {
        var names = new[] {"Llewellyn", "James", "Dan", "Jason", "Katrina"};
        Array.Sort(names);
        Approvals.VerifyAll(names, label: "");
    }
}

snippet source | anchor

Will Produce a File

`SampleTest.TestList.received.txt`

[0] = Dan
[1] = James
[2] = Jason
[3] = Katrina
[4] = Llewellyn

snippet source | anchor

It will also open these 2 files (.received. & .approved. ) in a diff editor.

You can approve these results by copying everything (ctrl+a, ctrl+c) and pasting it in the right hand side (ctrl+a, ctrl+v)

In most situations, you will use one of the supported DiffTools to examine and approve the result.

Alternatively, you can rename the .received. file to SampleTest.TestList.approved.txt and the test will now pass.

note: The diff tools are NOT opened when the tests pass, only on failure.

Approved File Artifacts

The *.approved.* files must be checked into source your source control. ApprovalTests now ignores line endings by default (so you can remove *.approved.* binary from your .gitattributes file if you added previously).

If you would like to verify line endings, simply add [assembly: IgnoreLineEndingsAttribute(false)] to your AssemblyInfo.cs

Do not add *.received.* files to your source control (they are transitory, and some SCMs like TFS will lock them or mark them read-only, which will break every dependent test).

More Info

Questions?

ask on twitter: @LlewellynFalco or #ApprovalTests

Credits

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].