public Address Create(Address address)
        {
            Validator.Validate(address);

            var saveAddress = _addressRepository.Save(address);
            return saveAddress;
        }
        public Address Update(Address address)
        {
            Validator.Validate(address);

            var updateAddress = _addressRepository.Update(address);
            return updateAddress;
        }
 public void CreateAValidAddressNeighborhoodTest()
 {
     Address address = new Address();
     address.City = "Lages";
     address.Cp = "88509230";
     Validator.Validate(address);
 }
 public Address Update(Address address)
 {
     DbEntityEntry entry = _context.Entry(address);
     entry.State = EntityState.Modified;
     _context.SaveChanges();
     return address;
 }
 public void Setup()
 {
     _address = ObjectMother.GetAddress();
     _mockRepository = new MockRepository(MockBehavior.Default);
     _addressRepoMoq = _mockRepository.Create<IAddressRepository>();
     _service = new AddressService(_addressRepoMoq.Object);
 }
 public void CreateAValidAddressStateTest()
 {
     Address address = new Address();
     address.City = "Lages";
     address.Cp = "88509230";
     address.Neighborhood = "São Cristovão";
     Validator.Validate(address);
 }
        public void Setup()
        {
            Database.SetInitializer(new DropCreateDatabaseAlways<ContextDb>());
            _repository = new AddressRepository();
            _address = ObjectMother.GetAddress();

            using (var context = new ContextDb())
            {
                context.Addresses.Add(_address);
                context.SaveChanges();
            }
        }
 public Address Save(Address address)
 {
     var newAddress = _context.Addresses.Add(address);
     _context.SaveChanges();
     return newAddress;
 }
 public void Setup()
 {
     _address = ObjectMother.GetAddress();
 }
 public void CreateAValidAddressCpTest()
 {
     Address address = new Address();
     address.City = "Lages";
     Validator.Validate(address);
 }
 public void CreateAValidAddressCityTest()
 {
     Address address = new Address();
     Validator.Validate(address);
 }