Пример #1
0
        public void GetDynamicPropertyPath()
        {
            var path = DependencyHelper.GetPropertyPath((DynamicEntity entity) =>
                                                        entity.Extensions.DynamicProperties.GetProperty <string>("String").Length);

            string s = string.Join(".", path.ToArray());

            s.ShouldEqual("Extensions.DynamicProperties.String.Length");
        }
Пример #2
0
        public void GetNestedPropertyPathValueObject()
        {
            var path = DependencyHelper.GetPropertyPath(
                (RecursiveEntity entity) => entity.Other.Other.Other.Other.Value);

            string s = string.Join(".", path.ToArray());

            s.ShouldEqual("Other.Other.Other.Other.Value");
        }
Пример #3
0
        public void GetNestedPropertyPathReferenceType()
        {
            var path = DependencyHelper.GetPropertyPath(
                (RecursiveEntity entity) => entity.Other.Other.Other.Other);

            string s = string.Join(".", path.ToArray());

            s.ShouldEqual("Other.Other.Other.Other");
        }
Пример #4
0
 public void InvalidPropertyPath()
 {
     DependencyHelper.GetPropertyPath(
         (RecursiveEntity entity) => entity.Other.Other.Other.GetType());
 }