public void Setup()
 {
     //Inicializa o banco, apagando e recriando-o
     Database.SetInitializer(new DropCreateDatabaseAlways<CustomerContext>());
     //Seta um registro padrão pra ser usado nos testes
     _contextForTest = new CustomerContext();
     var local = ObjectMother.GetLocal();
     _contextForTest.Locais.Add(local);
     _contextForTest.SaveChanges();
 }
        public void Setup()
        {
            //Inicializa o banco, apagando e recriando-o
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<CustomerContext>());
            //Seta um registro padrão pra ser usado nos testes
            _contextForTest = new CustomerContext();

            var customer = ObjectMother.GetCustomer();

            _contextForTest.Customers.Add(customer);

            _contextForTest.SaveChanges();
        }
 public LocalRepository()
 {
     context = new CustomerContext();
 }
 public CustomerRepository()
 {
     context = new CustomerContext();
 }