public void CreateProductShouldCreateProduct() { using (var context = new Entity.StoreDBContext(options)) { IStoreRepository _repo = new StoreRepoDB(context, new StoreMapper()); _repo.CreateProduct ( new Model.Product { ProductName = "Bat Tears", ProductPrice = 5 } ); } using (var assertContext = new Entity.StoreDBContext(options)) { var result = assertContext.Products.FirstOrDefault(product => product.ProductName == "Bat Tears"); Assert.NotNull(result); Assert.Equal("Bat Tears", result.ProductName); } }