public void DoesItWork() { var value = new StringValue("hi"); Assert.AreEqual("hi", value.GetValue(new Mock<IYateDataContext>().Object)); Assert.IsInstanceOf<string>(value.GetValue(new Mock<IYateDataContext>().Object)); value = new StringValue(null); Assert.AreEqual(null, value.GetValue(new Mock<IYateDataContext>().Object)); }
public IfFunctionValue(IValue conditioinValue, IValue trueConditionValue, IValue falseConditionValue) { if (conditioinValue == null) { throw new ArgumentNullException("conditioinValue"); } if (trueConditionValue == null) { throw new ArgumentNullException("trueConditionValue"); } if (falseConditionValue == null) { falseConditionValue = new StringValue(""); } _conditioinValue = conditioinValue; _trueConditionValue = trueConditionValue; _falseConditionValue = falseConditionValue; }