public void ToStringTest() { var left = new FakeToStringCondition("Valor1"); var right = new FakeToStringCondition("Valor2"); var sut = new EqualOrGreaterThanCondition(left, right); var actual = sut.ToString(); actual.Should().Be("Valor1 >= Valor2"); }
public void Evaluate(object leftValue, object rightValue, bool expectedResult) { var variables = A.Dummy <IVariableDictionary>(); var left = A.Fake <IConditionKeyword>(i => i.Strict()); A.CallTo(() => left.Evaluate(variables)).Returns(leftValue); var right = A.Fake <IConditionKeyword>(i => i.Strict()); A.CallTo(() => right.Evaluate(variables)).Returns(rightValue); var sut = new EqualOrGreaterThanCondition(left, right); var actual = sut.Evaluate(variables); actual.Should().Be(expectedResult); }