コード例 #1
0
        public void SetUp()
        {
            mocks       = new MockRepository();
            mockContext = mocks.CreateMock <IApplicationContext>();

            advice = new ParameterValidationAdvice();
            advice.ApplicationContext = mockContext;

            requiredValidator = new RequiredValidator();
            requiredValidator.Actions.Add(new ErrorMessageAction("error.required", "errors"));
        }
コード例 #2
0
 /// <summary>
 /// Creates new advisor instance.
 /// </summary>
 public ParameterValidationAdvisor()
 {
     Advice    = new ParameterValidationAdvice();
     Attribute = typeof(ValidatedAttribute);
     Inherit   = false;
 }