Esempio n. 1
0
        public void ResolveValue_HasSubPath_ReturnsExpectedValue()
        {
            var data = new
            {
                Order = new
                {
                    Amount = 10
                }
            };
            var path  = new PropertyPathParser().Parse("Order.Amount");
            var value = path.ResolveValue <int>(data, new ReflectionPropertyValueResolver());

            Assert.AreEqual(data.Order.Amount, value);
        }
Esempio n. 2
0
        public override object ResolveVariable(string variable)
        {
            var path = new PropertyPathParser().Parse(variable);

            return(path.ResolveValue(_data, new ReflectionPropertyValueResolver()));
        }