Exemple #1
0
        public void ByProduct_Should_Throw_ArgumentNullException_If_ProductId_Is_Empty()
        {
            IQueryable <ProductReview> reviews = new ProductReview[0].AsQueryable();
            Guid productId = Guid.Empty;

            var ex = Assert.Throws <ArgumentException>(() => ProductReviewExtensions.ByProduct(reviews, productId));

            Assert.Equal(nameof(productId), ex.ParamName);
        }
Exemple #2
0
        public void ByProduct_Should_Throw_ArgumentNullException_If_Reviews_Is_Null()
        {
            IQueryable <ProductReview> reviews = null;
            Guid productId = Guid.NewGuid();

            var ex = Assert.Throws <ArgumentNullException>(() => ProductReviewExtensions.ByProduct(reviews, productId));

            Assert.Equal(nameof(reviews), ex.ParamName);
        }