fluent-assertions Questions
3
Solved
In Fluent Assertions when comparing objects with DateTime properties there are sometimes a slight mismatch in the milliseconds and the comparison fail. The way we get around it is to set the compar...
Pantheas asked 19/12, 2013 at 23:45
3
Solved
Using fluent assertions, I would like to assert that a given string contains either one of two strings:
actual.Should().Contain("oneWay").Or().Should().Contain("anotherWay");
// eiter value shoul...
Boundary asked 28/8, 2014 at 6:31
1
Solved
Can anybody summarize differences and usage scope between them?
I read SO articles,
ShouldBeEquivalientTo(): ShouldBeEquivalentTo() is intended to be used for comparing complex object graphs rat...
Droit asked 19/9, 2014 at 2:43
2
Solved
Using FluentAssertion 3.1.229, how do you compare the content of two distinct MemoryStream?
Writing actualStream.Should().Be(expectedStream); yields the following error:
System.IO.MemoryStream
{
...
Domella asked 2/9, 2014 at 20:9
2
Solved
In FluentAssertions, you can make various claims in various formats.
x.Should().BeEquivalentTo(y);
x.ShouldBeEquivalentTo(y);
are both valid assertions.
Why is Should a method and not a propert...
Broomfield asked 18/8, 2014 at 15:4
1
Solved
I have a .net 4.0 test project which is throwing a method not found exceptions for the Should() extension method.
Then I noticed it also was throwing exceptions for an int type as well.
Does anyb...
Claudy asked 29/4, 2014 at 17:55
1
Solved
How to check that each object of a collection conforms to a given predicate? E.g.: check for each item (from a given collection) that it matches a given predicate (MyPredicate). Code should probabl...
Habit asked 29/4, 2014 at 13:25
4
Solved
I've got a pair of Lists I'm trying to compare using Fluent Assertions. I can code up a comparison easily, but I'd like to use Fluent Assertions so that I can get the reason to show up in the test ...
Ettie asked 26/3, 2012 at 18:29
3
Solved
I'm writing unit tests for my F# library using F#, Visual Studio Unit Testing Framework (aka MSTest) and FluentAssertions.
Test method should have return type either void or Task. In C# that's eas...
Actinozoan asked 12/3, 2014 at 23:11
2
Solved
I am trying to check an async method throws concrete exception.
For that I am using MSTEST and FluentAssertions 2.0.1.
I have checked this Discussion on Codeplex and to see how it works with asyn...
Anent asked 14/8, 2013 at 19:11
2
Solved
I have two arrays of double. Is there a way using FluentAssertions to compare the arrays element-by-element, using the .BeApproximately() technique?
One range value would suffice for the entire ar...
Fish asked 11/6, 2013 at 22:4
1
Solved
I have the following spec
BidirectionalGraph Fixture = new BidirectionalGraph();
public void VerticesShouldBeAbleToAssociateMultipleEdges()
{
int a = 0;
int b = 1;
int c = 2;
Fixture.AddEdge...
Parliament asked 10/5, 2013 at 7:40
1
Solved
I have a test that verifies the collection output of a method. This variation of the test passes:
[TestMethod, TestCategory("BVT")]
public void TheStatusesAreReturned()
{
var expectedUnprocess...
Filterable asked 22/4, 2013 at 14:20
2
Solved
I'm implementing a special case of an immutable dictionary, which for convenience implements IEnumerable<KeyValuePair<Foo, Bar>>. Operations that would ordinarily modify the dictionary ...
Meander asked 13/3, 2013 at 14:53
1
Solved
In my NUnit/FluentAssertions tests I compare the complex object returned from my system with a reference one using the following code:
response.ShouldBeEquivalentTo(reference, o => o.Excluding...
Sulfide asked 12/3, 2013 at 12:42
4
Solved
I have two extension methods:
public static IPropertyAssertions<T> ShouldHave<T>(this T subject)
{
return new PropertyAssertions<T>(subject);
}
public static IPropertyAssertion...
Wireless asked 25/3, 2012 at 12:13
1
Solved
I was writing some unit tests for a utility library when I came across a test I would expect to fail that actually passed. The issue is related to comparing two float variables, versus comparing on...
Mendiola asked 25/5, 2012 at 9:57
2
Solved
I would like to "combine" Fluent Assertion's collection assertions and property assertions, e.g. assert that two IEnumerable's are pairwise-equal using property-by-property (possibly "nested") comp...
Scoter asked 25/1, 2012 at 17:5
© 2022 - 2024 — McMap. All rights reserved.