public void UrlForInterfaceShouldReturnCorrectUrl() { var vm = new TestUrlViewModel() { TestUrl = new TestUrl() }; ActionFactory.Actions.Add(typeof(TestUrl), new ActionInfo()); RouteTable.Routes.Add(typeof(TestUrl).FullName, new Route("fakeUrl", null)); var html = MvcMockHelpers.GetHtmlHelper(vm); html.Form(vm.TestUrl); Assert.AreEqual(typeof(TestUrl), html.ViewContext.HttpContext.Items[TagGenerator.FORMINPUTTYPE]); }
public void UrlForInterfaceShouldReturnCorrectUrl() { var vm = new TestUrlViewModel() { TestUrl = new TestUrl() }; ActionFactory.Actions.Add(typeof(TestUrl), new ActionInfo()); RouteTable.Routes.Add(typeof(TestUrl).FullName, new Route("fakeUrl", null)); var html = MvcMockHelpers.GetHtmlHelper(vm); html.Form(vm.TestUrl); Assert.AreEqual(typeof(TestUrl), html.ViewContext.HttpContext.Items[TagGenerator.FORMINPUTTYPE]); }