public void And_when_false()
 {
     //const string expression = "Person.Name == \"Matt\" And Person.Position == \"Manager\"";
     const string expression = "Person.Name = \"Matt\" And (Person.Position <> \"Manager\" or Person.Age = 40)";
     var matt = new Person { Name = "Matt", Position = "Manager", Age = 40 };
     var result = PrecedentExpression.Resolve(expression, matt, "Person");
     Assert.That(result == true);
 }
 public void setup()
 {
     source = new Person
     {
         FirstName = "Bill",
         LastName = "Smith",
         Age = 43,
         Address = new Address() { Street = "123 Some Street", City = "OurTown", State = "State", PostCode = 1000 },
         Friend = new Contact() { FullName = "Someone", StreetAddress1 = "SA1", PhoneNumber = "234" }
     };
 }
        public void Test_Merging_Two_Objects()
        {
            var destination = new Person
            {
                FirstName = "Barbara",
                LastName = null,
                Age = null,
                Address = null,
                Friend = new Contact()
            };

            ObjectMapper.MergeNulls(source, destination);
            ObjectMapper.MergeNulls(source.Friend, destination.Friend);
            Assert.That(destination, Is.Not.Null);
        }
 public void Test_Copying_an_object()
 {
     var destination = new Person();
     ObjectMapper.Copy(source, destination);
     Assert.That(destination, Is.Not.Null);
 }