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

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

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

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

            await repository.Delete(entity.Id);

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

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

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

            await repository.Delete(entity.Id);

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

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