コード例 #1
0
        public void SetUp()
        {
            var condition = FieldRuleCondition.For <ConditionalFieldRuleTester>(x => x.Matches);

            theInnerRule       = MockRepository.GenerateMock <IFieldValidationRule>();
            theConditionalRule = new ConditionalFieldRule <ConditionalFieldRuleTester>(condition, theInnerRule);
        }
コード例 #2
0
        public void SetUp()
        {
            var condition = FieldRuleCondition.For<ConditionalFieldRuleTester>(x => x.Matches);

            theInnerRule = MockRepository.GenerateMock<IFieldValidationRule>();
            theConditionalRule = new ConditionalFieldRule<ConditionalFieldRuleTester>(condition, theInnerRule);
        }
コード例 #3
0
        public void does_not_match_conditional_field_rules()
        {
            var theRule = new ConditionalFieldRule <AjaxTarget>(new IsValid(), new RequiredFieldRule());

            theStrategy.Matches(theRule).ShouldBeFalse();
        }
		public void does_not_match_conditional_field_rules()
		{
			var theRule = new ConditionalFieldRule<AjaxTarget>(new IsValid(), new RequiredFieldRule());
			theStrategy.Matches(theRule).ShouldBeFalse();
		}