Exemplo n.º 1
0
 public void when_preference_is_within_range_productattribute_then_match()
 {
     MetaAttribute housePrice = new MetaAttributeBuilder().HousePrice();
     Preference housePricePreference = new PreferenceBuilder().WithMetaAttribute(housePrice).WithRawValues("30000000-45000000").Build();
     ProductAttribute housePriceProductAttribute = new ProductAttributeBuilder().WithMetaAttribute(housePrice).WithRawValue("44000000").Build();
     Assert.IsTrue(housePricePreference.IsMatchOn(housePriceProductAttribute));
 }
Exemplo n.º 2
0
 public void when_preference_is_within_set_productattribute_then_match()
 {
     MetaAttribute houseSuburb = new MetaAttributeBuilder().HouseSuburb();
     Preference houseSuburbPreference = new PreferenceBuilder().WithMetaAttribute(houseSuburb).WithRawValues("Milton,Cleveland,Broken Hill").Build();
     ProductAttribute houseSuburbProductAttribute = new ProductAttributeBuilder().WithMetaAttribute(houseSuburb).WithRawValue("Cleveland").Build();
     Assert.IsTrue(houseSuburbPreference.IsMatchOn(houseSuburbProductAttribute));
 }
Exemplo n.º 3
0
 public void when_preference_and_productattribute_have_different_metaattribute_then_match()
 {
     MetaAttribute housePrice = new MetaAttributeBuilder().HousePrice();
     MetaAttribute houseSuburb = new MetaAttributeBuilder().HouseSuburb();
     Preference housePricePreference = new PreferenceBuilder().WithMetaAttribute(housePrice).WithRawValues("30000000-45000000").Build();
     ProductAttribute houseSuburbProductAttribute = new ProductAttributeBuilder().WithMetaAttribute(houseSuburb).WithRawValue("Cleveland").Build();
     Assert.IsTrue(housePricePreference.IsMatchOn(houseSuburbProductAttribute));
 }