Esempio n. 1
0
        public async Task CancelAsync_ShouldReturnCorrectResult()
        {
            MapperInitializer.InitializeMapper();
            var context = ApplicationDbContextInMemoryFactory.InitializeContext();
            var reservationRepository = new EfDeletableEntityRepository <Reservation>(context);
            var reservationsService   = new ReservationsService(reservationRepository);
            var seeder = new DbContextTestsSeeder();
            await seeder.SeedReservationsAsync(context);

            var result = await reservationsService.CancelAsync(1);

            Assert.True(result == 1, ErrorMessage);
        }