public void ShouldNotMatchWhenOneRuleDoesntMatch() { MethodBase member = GetType().GetMethod("ShouldNotMatchWhenOneRuleDoesntMatch"); MatchingRuleSet ruleSet = new MatchingRuleSet(); ruleSet.Add(new TypeMatchingRule(typeof(MatchingRuleSetFixture))); Assert.IsTrue(ruleSet.Matches(member)); ruleSet.Add(new MemberNameMatchingRule("ThisMethodDoesntExist")); Assert.IsFalse(ruleSet.Matches(member)); }
public void ShouldNotMatchWhenOneRuleDoesntMatch() { MethodBase member = GetType().GetMethod("ShouldNotMatchWhenOneRuleDoesntMatch"); MatchingRuleSet ruleSet = new MatchingRuleSet(); ruleSet.Add(new TypeMatchingRule(typeof(MatchingRuleSetFixture))); Assert.IsTrue(ruleSet.Matches(member)); ruleSet.Add(new MemberNameMatchingRule("ThisMethodDoesntExist")); Assert.IsFalse(ruleSet.Matches(member)); }
public void ShouldMatchWithMatchingTypeRule() { MatchingRuleSet ruleSet = new MatchingRuleSet(); ruleSet.Add(new TypeMatchingRule(typeof(MatchingRuleSetFixture))); MethodBase member = GetType().GetMethod("ShouldMatchWithMatchingTypeRule"); Assert.IsTrue(ruleSet.Matches(member)); }
public void ShouldMatchTypeWithTypeMatchRule() { MatchingRuleSet ruleSet = new MatchingRuleSet(); ruleSet.Add(new TypeMatchingAssignmentRule(typeof(MockDal))); Assert.IsTrue(ruleSet.Matches(typeof(MockDal))); }
public void ShouldMatchWithMatchingTypeRule() { MatchingRuleSet ruleSet = new MatchingRuleSet(); ruleSet.Add(new TypeMatchingRule(typeof(MatchingRuleSetFixture))); MethodBase member = GetType().GetMethod("ShouldMatchWithMatchingTypeRule"); Assert.IsTrue(ruleSet.Matches(member)); }