Ejemplo n.º 1
0
        public void EvalOutputValue_GetResult_return_property_value_as_string()
        {
            var model             = new Model(new { Count = 5 });
            var templateEvaluator = new TemplateEvaluator(model);

            var element = new OutputValueTemplateElement
            {
                ValueAccess = new PropertyValueAccess
                {
                    Name = "Count"
                }
            };

            templateEvaluator.EvalOutputValue(element);

            string result = templateEvaluator.GetResult();

            Assert.AreEqual("5", result);
        }
 internal void EvalOutputValue(OutputValueTemplateElement element)
 {
     _result.Append(_model.GetValue(element.ValueAccess));
 }