public void VariantsOf_Should_Throw_ArgumentException_If_ProductId_Is_Empty() { IQueryable <Product> products = new Product[0].AsQueryable(); Guid productId = Guid.Empty; var ex = Assert.Throws <ArgumentException>(() => ProductExtensions.VariantsOf(products, productId)); Assert.Equal(nameof(productId), ex.ParamName); }
public void VariantsOf_Should_Throw_ArgumentNullException_If_Products_Is_Null() { IQueryable <Product> products = null; Guid productId = Guid.NewGuid(); var ex = Assert.Throws <ArgumentNullException>(() => ProductExtensions.VariantsOf(products, productId)); Assert.Equal(nameof(products), ex.ParamName); }