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);
        }
Beispiel #3
0
 public Consumer()
 {
     Filter = new ProductFilter(new List<Product>());
 }
Beispiel #4
0
 public Consumer()
 {
     Filter = new ProductFilter(new List <Product>());
 }