public void TestNotEvaluatorReturnsNullWhenConditionIsNull() { var notCondition = new NotCondition { Condition = null }; Assert.That(notCondition.Evaluate(null, null, Logger), Is.Null); }
public void TestNotEvaluatorReturnsNullWhenOperandEvaluateToNull() { var notCondition = new NotCondition { Condition = NullCondition }; Assert.That(notCondition.Evaluate(null, null, Logger), Is.Null); }
public void TestNotEvaluatorReturnsFalseWhenOperandEvaluateToTrue() { var notCondition = new NotCondition { Condition = TrueCondition }; Assert.That(notCondition.Evaluate(null, null, Logger), Is.False); }
public void Evaluate(bool value) { var variables = A.Dummy <IVariableDictionary>(); var condition = A.Fake <ICondition>(i => i.Strict()); A.CallTo(() => condition.Evaluate(variables)).Returns(value); var sut = new NotCondition(condition); var actual = sut.Evaluate(variables); actual.Should().Be(!value); }