public void DeleteNotFound()
        {
            Mock <ILogger <SaleTicketsRepository> > loggerMoc = SaleTicketsRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = SaleTicketsRepositoryMoc.GetContext();
            var repository = new SaleTicketsRepository(loggerMoc.Object, context);

            Func <Task> delete = async() =>
            {
                await repository.Delete(default(int));
            };

            delete.Should().NotThrow();
        }
        public async void Delete()
        {
            Mock <ILogger <SaleTicketsRepository> > loggerMoc = SaleTicketsRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = SaleTicketsRepositoryMoc.GetContext();
            var         repository       = new SaleTicketsRepository(loggerMoc.Object, context);
            SaleTickets entity           = new SaleTickets();

            context.Set <SaleTickets>().Add(entity);
            await context.SaveChangesAsync();

            await repository.Delete(entity.Id);

            SaleTickets modifiedRecord = await context.Set <SaleTickets>().FirstOrDefaultAsync();

            modifiedRecord.Should().BeNull();
        }
        public async void DeleteFound()
        {
            Mock <ILogger <SaleTicketsRepository> > loggerMoc = SaleTicketsRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = SaleTicketsRepositoryMoc.GetContext();
            var         repository       = new SaleTicketsRepository(loggerMoc.Object, context);
            SaleTickets entity           = new SaleTickets();

            entity.SetProperties(default(int), 1, 1);
            context.Set <SaleTickets>().Add(entity);
            await context.SaveChangesAsync();

            await repository.Delete(entity.Id);

            var records = await context.Set <SaleTickets>().ToListAsync();

            records.Count.Should().Be(1);
        }