I have the following spec
BidirectionalGraph Fixture = new BidirectionalGraph();
public void VerticesShouldBeAbleToAssociateMultipleEdges()
{
int a = 0;
int b = 1;
int c = 2;
Fixture.AddEdge(a, b);
Fixture.AddEdge(b, c);
Fixture.AddEdge(c, a);
Fixture.EdgesFrom(a).Should().BeEquivalentTo
( new []{a, b}
, new []{a, c});
}
where EdgesFrom is defined so
public IEnumerable<int[]> EdgesFrom(int vertex)
however my test fails with
Result Message: Expected collection
{{0, 1}, {0, 2}} to be equivalent to
{{0, 1}, {0, 2}}.
Which doesn't quite makes sense to me as they are obviously equivalent.
Does FluentAssertions
just not work when comparing collections
of collections?
1
to keep backward compatibility. – Parliament