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"); }
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"); }
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"); }
public void InvalidPropertyPath() { DependencyHelper.GetPropertyPath( (RecursiveEntity entity) => entity.Other.Other.Other.GetType()); }