Exemplo n.º 1
0
        public async void CanDeleteVenue()
        {
            using (var setup = new SQLiteInMemorySetup())
            {
                using (var context = new ConcertManagerContext(setup.ContextOptions))
                {
                    context.Database.EnsureCreated();
                }

                using (var context = new ConcertManagerContext(setup.ContextOptions))
                {
                    var service = new VenueService(context);
                    await service.DeleteVenueAsync(5);
                }

                using (var context = new ConcertManagerContext(setup.ContextOptions))
                {
                    Assert.Equal(4, context.Venues.Count());
                }
            }
        }