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); }
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); }
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); }