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

            var entity = new Rate();
            await repository.Create(entity);

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

            record.Should().NotBeNull();
        }
        public async void Get()
        {
            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();

            var record = await repository.Get(entity.Id);

            record.Should().NotBeNull();
        }
        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 Update_Entity_Is_Not_Tracked()
        {
            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.Update(new Rate());

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

            modifiedRecord.Should().NotBeNull();
        }