我正在编写单元测试,我有一些看起来像这样的东西:
[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>