public void ResolveType_NestedType_ReturnsExpectedType() { var path = new PropertyPathParser().Parse("ClassB.ClassC.Name"); var type = path.ResolveType(typeof(ClassA)); Assert.AreEqual(typeof(string), type); }
public void ResolveType_ObjectInstanceWithSubPath_ReturnsExpectedType() { var data = new { Order = new { Amount = 10 } }; var path = new PropertyPathParser().Parse("Order.Amount"); var type = path.ResolveType(data); Assert.AreEqual(typeof(int), type); }