{"id":13458301,"url":"https://github.com/fluentassertions/fluentassertions","last_synced_at":"2026-02-07T21:12:34.509Z","repository":{"id":37413103,"uuid":"11718424","full_name":"fluentassertions/fluentassertions","owner":"fluentassertions","description":"A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET Core 2.1, .NET Core 3.0, .NET 6, .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.","archived":false,"fork":false,"pushed_at":"2025-05-05T15:08:40.000Z","size":37073,"stargazers_count":3806,"open_issues_count":79,"forks_count":719,"subscribers_count":69,"default_branch":"main","last_synced_at":"2025-05-05T16:27:15.290Z","etag":null,"topics":["assertions","bdd-style","c-sharp","fluent-assertions","hacktoberfest","mstest","tdd","unit-testing","xunit"],"latest_commit_sha":null,"homepage":"https://xceed.com/products/unit-testing/fluent-assertions/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluentassertions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"fluentassertions","ko_fi":"dennisdoomen","patreon":"fluentassertions","custom":["https://paypal.me/fluentassertions"]}},"created_at":"2013-07-28T10:35:25.000Z","updated_at":"2025-05-05T15:08:42.000Z","dependencies_parsed_at":"2023-09-22T13:17:54.997Z","dependency_job_id":"238304cb-597a-440b-b7e1-d50d249671a0","html_url":"https://github.com/fluentassertions/fluentassertions","commit_stats":{"total_commits":3443,"total_committers":247,"mean_commits":13.93927125506073,"dds":0.7728724949172233,"last_synced_commit":"50961b72884f0289800b90b1d58f33034bd57d13"},"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentassertions%2Ffluentassertions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentassertions%2Ffluentassertions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentassertions%2Ffluentassertions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentassertions%2Ffluentassertions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluentassertions","download_url":"https://codeload.github.com/fluentassertions/fluentassertions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253501658,"owners_count":21918313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assertions","bdd-style","c-sharp","fluent-assertions","hacktoberfest","mstest","tdd","unit-testing","xunit"],"created_at":"2024-07-31T09:00:50.153Z","updated_at":"2026-02-07T21:12:34.503Z","avatar_url":"https://github.com/fluentassertions.png","language":"C#","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n\u003ca href=\"https://www.fluentassertions.com\"\u003e\u003cimg src=\"docs/assets/images/FA_Full_Logo.png\" style=\"width:500px\"/\u003e\u003c/a\u003e\n\nExtension methods to fluently assert the outcome of .NET tests\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![](https://img.shields.io/github/actions/workflow/status/fluentassertions/fluentassertions/build.yml?branch=develop)](https://github.com/fluentassertions/fluentassertions/actions?query=branch%3Adevelop)\n[![Coveralls branch](https://img.shields.io/coverallsCoverage/github/fluentassertions/fluentassertions?branch=main)](https://coveralls.io/github/fluentassertions/fluentassertions?branch=main)\n[![qodana](https://github.com/fluentassertions/fluentassertions/actions/workflows/code_quality.yml/badge.svg)](https://github.com/fluentassertions/fluentassertions/actions/workflows/code_quality.yml)\n[![](https://img.shields.io/github/release/FluentAssertions/FluentAssertions.svg?label=latest%20release\u0026color=007edf)](https://github.com/FluentAssertions/FluentAssertions/releases/latest)\n[![](https://img.shields.io/nuget/dt/FluentAssertions.svg?label=downloads\u0026color=007edf\u0026logo=nuget)](https://www.nuget.org/packages/FluentAssertions)\n[![](https://img.shields.io/librariesio/dependents/nuget/FluentAssertions.svg?label=dependent%20libraries)](https://libraries.io/nuget/FluentAssertions)\n![GitHub Repo stars](https://img.shields.io/github/stars/fluentassertions/fluentassertions?style=flat)\n[![GitHub contributors](https://img.shields.io/github/contributors/fluentassertions/fluentassertions)](https://github.com/fluentassertions/fluentassertions/graphs/contributors)\n[![GitHub last commit](https://img.shields.io/github/last-commit/fluentassertions/fluentassertions)](https://github.com/fluentassertions/fluentassertions)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/fluentassertions/fluentassertions)](https://github.com/fluentassertions/fluentassertions/graphs/commit-activity)\n[![open issues](https://img.shields.io/github/issues/fluentassertions/fluentassertions)](https://github.com/fluentassertions/fluentassertions/issues)\n![](https://img.shields.io/badge/release%20strategy-githubflow-orange.svg)\n\n\n\u003ca href=\"#about\"\u003eAbout\u003c/a\u003e •\n\u003ca href=\"#download\"\u003eDownload\u003c/a\u003e •\n\u003ca href=\"#how-do-i-use-it\"\u003eHow To Use\u003c/a\u003e •\n\u003ca href=\"#building\"\u003eBuilding\u003c/a\u003e •\n\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n\u003ca href=\"#versioning\"\u003eVersioning\u003c/a\u003e •\n\n\u003c/div\u003e\n\n# About\n\nFluent Assertions offers a comprehensive suite of extension methods that enable developers to naturally express the expected outcomes of TDD (Test-Driven Development) or BDD (Behavior-Driven Development) unit tests. By providing a more readable and intuitive approach to writing assertions, it streamlines the testing process and improves code clarity. It supports a wide range of .NET platforms, including .NET Framework 4.7, .NET Core 2.1, 3.0, and 6, as well as .NET Standard 2.0 and 2.1, ensuring compatibility across various modern development environments.\n\n# Xceed Partnership\nOriginally authored by Dennis Doomen with Jonas Nyrup as the productive side-kick. Xceed is now an official Partner to Fluent Assertions! [Learn what this partnership means for our users](https://xceed.com/fluent-assertions-faq/). After extensive discussions with the Fluent Assertions team, we are thrilled about the future of the product and look forward to its continued growth and development.\n\n# Download\n\nThis library is available as a NuGet package on https://nuget.org. To install it, use the following command-line:\n\n`dotnet add package FluentAssertions`\n\n# How do I use it\n\nFluent Assertions contains a tremendous amount of assertion methods that will make your unit tests easier to read and give you as much information possible upon failure. Consider this example.\n\n```csharp\nIEnumerable\u003cint\u003e numbers = new[] { 1, 2, 3 };\n\nnumbers.Should().OnlyContain(n =\u003e n \u003e 0);\nnumbers.Should().HaveCount(4, \"because we thought we put four items in the collection\");\n```\n\nThis should give you the following failure:\n\n```text\nExpected numbers to contain 4 item(s) because we thought we put four items in the collection, but found 3.\n```\n\nVisit https://www.fluentassertions.com for [background information](https://fluentassertions.com/about/), [usage documentation](https://fluentassertions.com/introduction), an [extensibility guide](https://fluentassertions.com/extensibility/), support information and more [tips \u0026 tricks](https://fluentassertions.com/tips/).\n\n# Building\nInstall Visual Studio 2026 18.0+ or JetBrains Rider 2025.3 as well as the Build Tools 2026 (including the Universal Windows Platform build tools). You will also need to have .NET Framework 4.7 SDK and .NET 10.0 SDK installed. Check the [global.json](global.json) for the current minimum required version.\n\nYou can also build, run the unit tests and package the code using the following command-line:\n\n`build.ps1`\n\nOr, if you have, the [Nuke tool installed](https://nuke.build/docs/getting-started/installation/):\n\n`nuke`\n\nAlso try using `--help` to see all the available options or `--plan` to see what the scripts does.\n\n## What are these Approval.Tests?\nThis is a special set of tests that use the [Verify](https://github.com/VerifyTests/Verify) project to verify whether you've introduced any breaking changes in the public API of the library.\n\nIf you've verified the changes and decided they are valid, you can accept them  using `AcceptApiChanges.ps1` or `AcceptApiChanges.sh`. Alternatively, you can use the [Verify Support](https://plugins.jetbrains.com/plugin/17240-verify-support) plug-in to compare the changes and accept them right from inside Rider. See also the [Contribution Guidelines](CONTRIBUTING.md).\n\n# Contributing\nYour contributions are always welcome! Please have a look at the [contribution guidelines](CONTRIBUTING.md) first.\n\n# Versioning\nThis library uses [Semantic Versioning](https://semver.org/) to give meaning to the version numbers. For the versions available, see the [tags](/releases) on this repository.\n\n## Credits\nThis library wouldn't have been possible without the following tools, packages and companies:\n\n* [Nuke](https://nuke.build/) - Smart automation for DevOps teams and CI/CD pipelines by [Matthias Koch](https://github.com/matkoch)\n* [xUnit](https://xunit.net/) - Community-focused unit testing tool for .NET by [Brad Wilson](https://github.com/bradwilson)\n* [Coverlet](https://github.com/coverlet-coverage/coverlet) - Cross platform code coverage for .NET by [Toni Solarin-Sodara](https://github.com/tonerdo)\n* [GitVersion](https://gitversion.net/) - From git log to SemVer in no time\n* [ReportGenerator](https://reportgenerator.io/) - Converts coverage reports by [Daniel Palme](https://github.com/danielpalme)\n* [StyleCopyAnalyzer](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) - StyleCop rules for .NET\n* [Roslynator](https://github.com/dotnet/roslynator) - A set of code analysis tools for C# by [Josef Pihrt](https://github.com/josefpihrt)\n* [CSharpCodingGuidelines](https://github.com/bkoelman/CSharpGuidelinesAnalyzer) - Roslyn analyzers by [Bart Koelman](https://github.com/bkoelman) to go with the [C# Coding Guidelines](https://csharpcodingguidelines.com/)\n* [Meziantou](https://github.com/meziantou/Meziantou.Framework) - Another set of awesome Roslyn analyzers by [Gérald Barré](https://github.com/meziantou)\n* [Verify](https://github.com/VerifyTests/Verify) - Snapshot testing by [Simon Cropp](https://github.com/SimonCropp)\n\n# Powered By\n\u003ca href=\"https://www.xceed.com\"\u003e\u003cimg src=\"docs/assets/images/xceed_logo_whiteB.png\" style=\"width:192px\"/\u003e\u003c/a\u003e\n\n## License\nVersions 8 and beyond are free for open-source projects and non-commercial use, but commercial use requires [a paid license](https://xceed.com/products/unit-testing/fluent-assertions/). \nCheck out the [license page](LICENSE) for more information. \n\nVersion 7 will remain fully open-source indefinitely and receive bugfixes and other important corrections.\n","funding_links":["https://github.com/sponsors/fluentassertions","https://ko-fi.com/dennisdoomen","https://patreon.com/fluentassertions","https://paypal.me/fluentassertions"],"categories":["C\\#","hacktoberfest","C# #","Testing and Mocking","Uncategorized","Libraries","框架, 库和工具","Testing","C#","Frameworks, Libraries and Tools","c-sharp","测试","Identifiers","🗒️ Cheatsheets"],"sub_categories":["Uncategorized","Testing","测试","GUI - other","📦 Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluentassertions%2Ffluentassertions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluentassertions%2Ffluentassertions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluentassertions%2Ffluentassertions/lists"}