【发布时间】:2015-10-10 02:28:41
【问题描述】:
我正在编写单元测试,我有一些看起来像这样的东西:
[Fact]
public void GetFoos_only_gets_foo1()
{
_foo1.included = true; //Foo object
_foo2.included = false; //Foo object
_sut.GetFoos().Should().OnlyContain(_foo1); // this doesn't work, is there a specific syntax to use?
}
GetFoos() 返回和IEnumberable<Foo>
【问题讨论】:
-
“不起作用”是什么意思?请澄清问题
标签: c# xunit fluent-assertions