Пример #1
0
 public void Setup()
 {
     _autoSubstitute = AutoSubstituteContainer.Create();
     _h = _autoSubstitute.ResolveAndSubstituteFor<HtmlHelper<TestFieldViewModel>>();
     _t = _autoSubstitute.Resolve<IFormTemplate>();
     _t.BeginForm(Action, Method, _htmlAttributes, Enctype).Returns(_beginHtml);
     _t.EndForm().Returns(_endHtml);
 }
Пример #2
0
 public void Setup()
 {
     _autoSubstitute = AutoSubstituteContainer.Create();
     _h = _autoSubstitute.ResolveAndSubstituteFor <HtmlHelper <TestFieldViewModel> >();
     _t = _autoSubstitute.Resolve <IFormTemplate>();
     _t.BeginForm(Action, Method, _htmlAttributes, Enctype).Returns(_beginHtml);
     _t.EndForm().Returns(_endHtml);
 }
Пример #3
0
        public void Setup()
        {
            _context = new MvcTestContext();
            var viewContext = _context.GetViewTestContext <TestFieldViewModel>();

            _h = viewContext.HtmlHelper;

            _t = Substitute.For <IFormTemplate>();
            _t.BeginForm(Action, Method, _htmlAttributes, Enctype).Returns(_beginHtml);
            _t.EndForm().Returns(_endHtml);
        }