public void GetOneAddressByID()
 {
     using (EFAddressMapper mapper = new EFAddressMapper(CONNECTION_STRING))
     {
         Assert.AreEqual(AddressClassic1.Road, mapper.FindBy(2).Road);
     }
 }
 public void GetOneAddressBysearch()
 {
     using (EFAddressMapper mapper = new EFAddressMapper(CONNECTION_STRING))
     {
         Expression <Func <Address, bool> > expression = a => a.Road == AddressClassic2.Road && a.Number == AddressClassic2.Number;
         Assert.AreEqual(1, mapper.FindBy(expression).Count);
     }
 }
        public void DeleteAddress()
        {
            using (EFAddressMapper mapper = new EFAddressMapper(CONNECTION_STRING))
            {
                mapper.Delete(3);

                Expression <Func <Address, bool> > expression = a => a.ID == 3;
                Assert.AreEqual(0, mapper.FindBy(expression).Count);
            }
        }
        public void UpdateAddress()
        {
            using (EFAddressMapper mapper = new EFAddressMapper(CONNECTION_STRING))
            {
                AddressClassic3 = mapper.AddorUpdate(AddressClassic3);

                AddressClassic3.Number = "105";

                mapper.AddorUpdate(AddressClassic3);


                Expression <Func <Address, bool> > expression = a => a.ID == AddressClassic3.ID;
                Assert.AreEqual("105", mapper.FindBy(AddressClassic3.ID).Number);
            }
        }