public void MultiDocumentQuery_If_Will_Execute_The_Given_Action_If_The_Condition_Is_True() { var sut = new MultiDocumentQuery(); var action = Substitute.For <Action <MultiDocumentQuery> >(); var result = sut.If(true, action); action.ReceivedCalls().Should().HaveCount(1); }
public void MultiDocumentQuery_If_Will_Execute_The_ElseAction_If_The_Condition_Is_False() { var sut = new MultiDocumentQuery(); var action = Substitute.For <Action <MultiDocumentQuery> >(); var elseAction = Substitute.For <Action <MultiDocumentQuery> >(); var result = sut.If(false, action, elseAction); action.ReceivedCalls().Should().BeEmpty(); elseAction.ReceivedCalls().Should().HaveCount(1); }