public void FilterBySmallReturn2() { // arrange ProductFilter filter = new ProductFilter(); IList<Product> products = BuildProducts(); // act var result = filter.By(products, new SpecificationSize(Size.Small)); // assert Assert.That(result.Count(), Is.EqualTo(2)); Assert.That(result, Has.All.Matches<Product>(x => x.Size == Size.Small)); }
public void FilterByBlueReturn2() { // arrange ProductFilter filter = new ProductFilter(); IList<Product> products = BuildProducts(); // act var result = filter.By(products, new SpecificationColor(Color.Blue)); // assert Assert.That(result.Count(), Is.EqualTo(2)); Assert.That(result, Has.All.Matches<Product>(x => x.Color == Color.Blue)); }
public void FilterByBlueReturn2() { // arrange ProductFilter filter = new ProductFilter(); IList <Product> products = this.BuildProducts(); // act var result = filter.By(products, new SpecificationColor(Color.Blue)); // assert Assert.That(result.Count(), Is.EqualTo(2)); Assert.That(result, Has.All.Matches <Product>(x => x.Color == Color.Blue)); }
public void FilterByBlueAndSmallReturn1() { // arrange ProductFilter filter = new ProductFilter(); IList <Product> products = this.BuildProducts(); // act var result = filter.By(products, new SpecificationColorAndSize(Color.Blue, Size.Small)); // assert Assert.That(result.Count(), Is.EqualTo(1)); Assert.That(result, Has.All.Matches <Product>(x => x.Size == Size.Small)); }
public void FilterByBlueAndSmallReturn1() { // arrange ProductFilter filter = new ProductFilter(); IList<Product> products = this.BuildProducts(); // act var result = filter.By(products, new SpecificationColorAndSize(Color.Blue, Size.Small)); // assert Assert.That(result.Count(), Is.EqualTo(1)); Assert.That(result, Has.All.Matches<Product>(x => x.Size == Size.Small)); }