public void EvaluateReturnsTrueIfConditionIsMatched() { var condition = new StatusTaskCondition { Status = IntegrationStatus.Success }; var result = this.mocks.StrictMock<IIntegrationResult>(); Expect.Call(result.Status).Return(IntegrationStatus.Success); this.mocks.ReplayAll(); var actual = condition.Eval(result); this.mocks.VerifyAll(); Assert.IsTrue(actual); }
public void EvaluateReturnsFalseIfConditionIsNotMatched() { var condition = new StatusTaskCondition { Status = IntegrationStatus.Success, Description = "Not equal test" }; var result = this.mocks.StrictMock<IIntegrationResult>(); Expect.Call(result.Status).Return(IntegrationStatus.Failure); this.mocks.ReplayAll(); var actual = condition.Eval(result); this.mocks.VerifyAll(); Assert.IsFalse(actual); }