public void CommandCanReturnFalse(CommandTestData test) { _runtime.Run(test.ExpectedCommand, ExpectedResultPrefix, test.Timeout).Returns(ExpectedResultNo); Assert.That(test.Method(_session, _pattern), Is.False); _pattern.Received(1).Validate(); _runtime.Received(1).Run(test.ExpectedCommand, ExpectedResultPrefix, test.Timeout); }
public void CommandCanReturnTrue(CommandTestData test) { _runtime.Run(test.ExpectedCommand, ExpectedResultPrefix, test.Timeout).Returns(ExpectedResultYes); Assert.That(test.Method(_session, _pattern), Is.True); _pattern.Received(1).Validate(); _runtime.Received(1).Run(test.ExpectedCommand, ExpectedResultPrefix, test.Timeout); }