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

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

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

            record.Should().NotBeNull();
        }
        public async void Get()
        {
            Mock <ILogger <ScrapReasonRepository> > loggerMoc = ScrapReasonRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ScrapReasonRepositoryMoc.GetContext();
            var repository = new ScrapReasonRepository(loggerMoc.Object, context);

            ScrapReason entity = new ScrapReason();

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

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

            record.Should().NotBeNull();
        }
        public async void Delete()
        {
            Mock <ILogger <ScrapReasonRepository> > loggerMoc = ScrapReasonRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ScrapReasonRepositoryMoc.GetContext();
            var         repository       = new ScrapReasonRepository(loggerMoc.Object, context);
            ScrapReason entity           = new ScrapReason();

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

            await repository.Delete(entity.ScrapReasonID);

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

            modifiedRecord.Should().BeNull();
        }
        public async void Update_Entity_Is_Not_Tracked()
        {
            Mock <ILogger <ScrapReasonRepository> > loggerMoc = ScrapReasonRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ScrapReasonRepositoryMoc.GetContext();
            var         repository       = new ScrapReasonRepository(loggerMoc.Object, context);
            ScrapReason entity           = new ScrapReason();

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

            await repository.Update(new ScrapReason());

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

            modifiedRecord.Should().NotBeNull();
        }