我曾经在NUnit中使用它们,它们确实很有用。任何想法如何做这样的事情?
编辑,代码示例:
bool condition = false;//would be nice not to have this
observable.Subscribe(_ =>
{
if (real test)
condition= true;//Assert.Pass()
});
StartObservable();
Assert.True(condition);//Assert.Fail()