public void DefaultFalseStatementsTests() { var value = new IfFunctionValue(new FalseFunctionValue(), new StringValue("yup")); Assert.AreEqual("", value.GetValue(new Mock<IYateDataContext>().Object)); }
public void TrueStatementsTests() { var value = new IfFunctionValue(new TrueFunctionValue(), new StringValue("yup"), new StringValue("nope")); Assert.AreEqual("yup", value.GetValue(new Mock<IYateDataContext>().Object)); }
public void ConditionalParamIsNotBoolTest() { var value = new IfFunctionValue(new StringValue("What happens here buddy?"), new TrueFunctionValue(), new FalseFunctionValue()); Assert.Throws<InvalidCastException>(() => value.GetValue(new Mock<IYateDataContext>().Object)); }