Top "Fluent-assertions" questions

Fluent Assertions is a set of .NET extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style test and which tries to keep you out of the debugger hell.

C# Fluent Assertions global options for ShouldBeEquivalentTo

In Fluent Assertions when comparing objects with DateTime properties there are sometimes a slight mismatch in the milliseconds and the …

c# fluent-assertions
FluentAssertions Asserting multiple properties of a single object

Is there a way to do something like this using FluentAssertions response.Satisfy(r => r.Property1== "something" && …

c# .net-core fluent-assertions
Can Fluent Assertions use a string-insensitive comparison for IEnumerable<string>?

I've got a pair of Lists I'm trying to compare using Fluent Assertions. I can code up a comparison easily, …

c# unit-testing fluent-assertions
FluentAssertions: Assert Collection contains Element that "IsEquivalentTo"

I'm stuck with what I thought was an easy example. I want to assert that a collection of objects contains …

c# fluent-assertions
Is there a more appropriate to test if the constructor throws an exception?

Normally you test, if an exception gets thrown in a certain method, as follows. I use FluentAssertions: [Fact] public void …

c# .net unit-testing xunit.net fluent-assertions
FluentAssertions: check a list contains an object, excluding a property

I have several Event classes which implement IEvent. To check actual event against expected event I use actualEvent.ShouldBeEquivalentTo(expectedEvent,…

.net fluent-assertions
FluentAssertions Type check

I try to use FluentAssertions to check in my UnitTest, that the type of a property in a list of …

c# .net unit-testing nunit fluent-assertions