public void EvaluatedCustomVariable_Constructor_Sets_Properties() { var evaluatedCustomVariable = new EvaluatedCustomVariable("name", () => "value"); Assert.AreEqual("name", evaluatedCustomVariable.Name); Assert.AreEqual("value", evaluatedCustomVariable.Value); }
public void EvaluatedCustomVariable_Evaluates_Value_Every_Time() { var count = 0; Func <string> countFunction = () => { count++; return(count.ToString(CultureInfo.InvariantCulture)); }; var evaluatedCustomVariable = new EvaluatedCustomVariable("name", countFunction); Assert.AreEqual("1", evaluatedCustomVariable.Value); Assert.AreEqual("2", evaluatedCustomVariable.Value); Assert.AreEqual("3", evaluatedCustomVariable.Value); }