public void Setup() { //Inicializa o banco, apagando e recriando-o //Database.SetInitializer(new DropCreateDatabaseAlways<TrufaContext>()); using (TrufaContext context = new TrufaContext()) { context.Database.Delete(); context.Database.CreateIfNotExists(); } //Seta um registro padrão pra ser usado nos testes _contextForTest = new TrufaContext(); _contextForTest.Sabores.AddRange(ObjectMother.GetSabores()); _contextForTest.SaveChanges(); }
public SaborRepository() { context = new TrufaContext(); }
public TrufaRepository() { context = new TrufaContext(); }