protected override void Context()
        {
            var product1 = new Mock<Product>();
            product1.SetupGet(x => x.Price).Returns(10m);
            product1.SetupGet(x => x.Color).Returns(Color.Green);

            var product2 = new Mock<Product>();
            product2.SetupGet(x => x.Price).Returns(20m);
            product2.SetupGet(x => x.Color).Returns(Color.Red);

            var products = new List<Product> {product1.Object, product2.Object};
            _productFilter = new ProductFilter(products);
        }
        protected override void Context()
        {
            var product1 = new Mock <Product>();

            product1.SetupGet(x => x.Price).Returns(10m);
            product1.SetupGet(x => x.Color).Returns(Color.Green);

            var product2 = new Mock <Product>();

            product2.SetupGet(x => x.Price).Returns(20m);
            product2.SetupGet(x => x.Color).Returns(Color.Red);

            var products = new List <Product> {
                product1.Object, product2.Object
            };

            _productFilter = new ProductFilter(products);
        }
Exemplo n.º 3
0
 public Consumer()
 {
     Filter = new ProductFilter(new List<Product>());
 }
Exemplo n.º 4
0
 public Consumer()
 {
     Filter = new ProductFilter(new List <Product>());
 }