public void Ctor_WithCustomizerThatDissablesRules_AppropriateRulesAreDissable() { var customerRuleCollectionCustomizer = new CustomerRuleCollectionCustomizer(); var customerRuleCollection = new CustomerRuleCollection(); customerRuleCollectionCustomizer.Customize(customerRuleCollection); var dissableRule = customerRuleCollection.FirstOrDefault(r => r == customerRuleCollection.FirstNameRequired); Assert.IsTrue(dissableRule.IsDisabled); }
public void Ctor_WithCustomizerThatDissablesRules_AppropriateRulesAreDissable() { var customerRuleCollectionCustomizer = new CustomerRuleCollectionCustomizer (); var customerRuleCollection = new CustomerRuleCollection (); customerRuleCollectionCustomizer.Customize ( customerRuleCollection ); var dissableRule = customerRuleCollection.FirstOrDefault ( r => r == customerRuleCollection.FirstNameRequired ); Assert.IsTrue ( dissableRule.IsDisabled ); }
public void Ctor_WithCustomizer_CustomizerRulesAreAdded() { var customerRuleCollectionCustomizer = new CustomerRuleCollectionCustomizer(); var customerRuleCollection = new CustomerRuleCollection(); customerRuleCollectionCustomizer.Customize(customerRuleCollection); var allRulesFound = true; foreach (var rule in customerRuleCollectionCustomizer) { if (!customerRuleCollection.Contains(rule)) { allRulesFound = false; } } Assert.IsTrue(allRulesFound); }
public void Ctor_WithCustomizer_CustomizerRulesAreAdded() { var customerRuleCollectionCustomizer = new CustomerRuleCollectionCustomizer (); var customerRuleCollection = new CustomerRuleCollection (); customerRuleCollectionCustomizer.Customize ( customerRuleCollection ); var allRulesFound = true; foreach ( var rule in customerRuleCollectionCustomizer ) { if ( !customerRuleCollection.Contains ( rule ) ) { allRulesFound = false; } } Assert.IsTrue ( allRulesFound ); }