protected override Action Controller <T>(Expression <Func <IProducerService, T> > func) { return(() => WithService(s => { var viewName = MvcHelper.GetViewName(func); var viewType = MvcHelper.GetViewType(viewName); var result = func.Compile()(s); OpenView(viewType, result); })); }
public void Try_to_get_view_name() { Assert.That(MvcHelper.GetViewName(s => s.GetEquivalents(1)), Is.EqualTo("GetEquivalents")); }