public void ThrowsExeptionTryingToGetKeyOfAPropertyWithNoFieldNameAttributeInChain() { var father = new Father(); father.GetKey(f => f.Son.Age); }
public void GetsSingleChainWithInterface() { var father = new Father(); Assert.AreEqual("daughter.name", father.GetKey(f => f.Daughter.Name)); }
public void GetsSingleKey() { var father = new Father(); Assert.AreEqual("name", father.GetKey(f => f.Name)); }
public void GetsListKey() { var father = new Father(); Assert.AreEqual("children", father.GetKey(f => f.Children)); }
public void GetsSingleChain() { var father = new Father(); Assert.AreEqual("son.name", father.GetKey(f => f.Son.Name)); }
public void GetsChainedKeyFollowingList() { var father = new Father(); Assert.AreEqual("children.sister.name", father.GetKey(f => f.Children[0].Sister.Name)); }
public void GetsComplexChain() { var father = new Father(); Assert.AreEqual("daughter.sister.sister.sister.name", father.GetKey(f => f.Daughter.Sister.Sister.Sister.Name)); }