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));
 }
Example #8
0
        public void GetsListKey()
        {
            var father = new Father();

            Assert.AreEqual("children", father.GetKey(f => f.Children));
        }
Example #9
0
        public void GetsChainedKeyFollowingList()
        {
            var father = new Father();

            Assert.AreEqual("children.sister.name", father.GetKey(f => f.Children[0].Sister.Name));
        }
Example #10
0
        public void GetsComplexChain()
        {
            var father = new Father();

            Assert.AreEqual("daughter.sister.sister.sister.name", father.GetKey(f => f.Daughter.Sister.Sister.Sister.Name));
        }
Example #11
0
        public void ThrowsExeptionTryingToGetKeyOfAPropertyWithNoFieldNameAttributeInChain()
        {
            var father = new Father();

            father.GetKey(f => f.Son.Age);
        }
Example #12
0
        public void GetsSingleChainWithInterface()
        {
            var father = new Father();

            Assert.AreEqual("daughter.name", father.GetKey(f => f.Daughter.Name));
        }
Example #13
0
        public void GetsSingleChain()
        {
            var father = new Father();

            Assert.AreEqual("son.name", father.GetKey(f => f.Son.Name));
        }
Example #14
0
        public void GetsSingleKey()
        {
            var father = new Father();

            Assert.AreEqual("name", father.GetKey(f => f.Name));
        }