我有以下规格
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});
}
其中 EdgesFrom 被定义为
public IEnumerable<int[]> EdgesFrom(int vertex)
但是我的测试失败了
Result Message: Expected collection
{{0, 1}, {0, 2}} to be equivalent to
{{0, 1}, {0, 2}}.
这对我来说不太有意义,因为它们显然是等价的。FluentAssertions
比较集合集合时不起作用?