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

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

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

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

            ShoppingCartItem entity = new ShoppingCartItem();

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

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

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

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

            await repository.Delete(entity.ShoppingCartItemID);

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

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

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

            await repository.Update(new ShoppingCartItem());

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

            modifiedRecord.Should().NotBeNull();
        }