public void TestExtract3()
        {
            var extractor = new PropertyFieldExtractor<Person> { Names = new[] { "Id", "Name", "InvalidProperty" } };
            var person = new Person { Id = 1, Name = "Person1" };

            extractor.Extract(person);
        }
        public void TestExtract2()
        {
            var extractor = new PropertyFieldExtractor <Person> {
                Names = new[] { "Id", "Name", "Parent.Parent.Name" }
            };
            var person = new Person
            {
                Id     = 3,
                Name   = "Person3",
                Parent = new Person
                {
                    Id     = 2,
                    Name   = "Person2",
                    Parent = new Person
                    {
                        Id   = 1,
                        Name = "Person1"
                    }
                }
            };

            var result = extractor.Extract(person);

            Assert.IsNotNull(result);
            Assert.AreEqual(3, result.Length);
            Assert.AreEqual(3L, result[0]);
            Assert.AreEqual("Person3", result[1]);
            Assert.AreEqual("Person1", result[2]);
        }
        public void TestExtract2()
        {
            var extractor = new PropertyFieldExtractor<Person> { Names = new[] { "Id", "Name", "Parent.Parent.Name" } };
            var person = new Person
            {
                Id = 3,
                Name = "Person3",
                Parent = new Person
                {
                    Id = 2,
                    Name = "Person2",
                    Parent = new Person
                    {
                        Id = 1,
                        Name = "Person1"
                    }
                }
            };

            var result = extractor.Extract(person);

            Assert.IsNotNull(result);
            Assert.AreEqual(3, result.Length);
            Assert.AreEqual(3L, result[0]);
            Assert.AreEqual("Person3", result[1]);
            Assert.AreEqual("Person1", result[2]);
        }
        public void TestExtract3()
        {
            var extractor = new PropertyFieldExtractor <Person> {
                Names = new[] { "Id", "Name", "InvalidProperty" }
            };
            var person = new Person {
                Id = 1, Name = "Person1"
            };

            extractor.Extract(person);
        }