Exemplo n.º 1
0
        public void FilterBySmallReturns2()
        {
            // arrange
            var filter = new ProductFilter();
            var products = BuildProducts();

            // act
            var result = filter.BySize(products,  ProductSize.Small);

            // assert
            Assert.That(result.Count(), Is.EqualTo(2));
            Assert.That(result, Has.All.Matches<Product>(x => x.Size == ProductSize.Small));
        }
Exemplo n.º 2
0
        public void FilterByBlueReturns2()
        {
            // arrange
            var filter = new ProductFilter();
            var products = BuildProducts();

            // act
            var result = filter.ByColor(products, ProductColor.Blue);

            // assert
            Assert.That(result.Count(), Is.EqualTo(2));
            Assert.That(result, Has.All.Matches<Product>(x => x.Color == ProductColor.Blue));
        }