【发布时间】:2013-05-04 20:24:11
【问题描述】:
我有以下规格
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 在比较集合时是否不起作用
收藏?
【问题讨论】:
标签: c# collections tdd fluent-assertions