public void It_Should_Derefence_A_Variable_Missing_Variable_As_None() { // Arrange var variableReference = new VariableReference("myvar"); var templateContext = new TemplateContext(); // Act var result = variableReference.Eval(templateContext, new List <Option <ILiquidValue> >()); // Assert Assert.That(result.SuccessResult.HasValue, Is.False); }
public void It_Should_Derefence_A_Variable() { // Arrange var variableReference = new VariableReference("myvar"); var templateContext = new TemplateContext(); templateContext.DefineLocalVariable("myvar", LiquidString.Create("HELLO")); // Act var result = variableReference.Eval(templateContext, new List <Option <ILiquidValue> >()).SuccessValue <LiquidString>(); // Assert Assert.That(result.Value, Is.EqualTo("HELLO")); }