Example #1
0
        public void when_product_has_no_productattributes_then_everything_matches()
        {
            var products = new ProductBuilder().GetCollectionOfProductsWithNoProductAttributes().ToList();
            var buyer = new BuyerBuilder().Build();

            products.ForEach(p => Assert.IsTrue(buyer.IsMatch(p)));

            buyer.Preferences.Add(new PreferenceBuilder().WithMetaAttribute(new MetaAttributeBuilder().HousePrice()).Build());
            products.ForEach(p => Assert.IsTrue(buyer.IsMatch(p)));
        }