コード例 #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 override void Accept(TemplateEvaluator evaluator)
 {
     evaluator.EvalOutputValue(this);
 }