public void Chain_call_to_check_model_error_in_property()
        {
            var returnVal = Substitute.For <IModelErrorTest <TestViewModel> >();

            _modelTest.AndModelErrorFor(Arg.Any <Expression <Func <TestViewModel, string> > >()).Returns(returnVal);

            Assert.That(_modelErrorTest.AndModelErrorFor(m => m.Property1), Is.EqualTo(returnVal));
        }
예제 #2
0
 public IModelErrorTest <TModel> AndModelErrorFor <TAttribute>(Expression <Func <TModel, TAttribute> > memberWithError)
 {
     return(_modelTest.AndModelErrorFor(memberWithError));
 }