public void ReturnRouteInstancesEvenWhenContextIsNull(Routes tab, ITabContext context) { context.Setup(x => x.GetRequestContext <HttpContextBase>()).Returns((HttpContextBase)null); System.Web.Routing.RouteTable.Routes.Clear(); System.Web.Routing.RouteTable.Routes.Ignore("Test"); var data = tab.GetData(context) as IList <RouteModel>; Assert.NotNull(data); Assert.Equal(System.Web.Routing.RouteTable.Routes.Count, data.Count); }
public void ReturnRouteInstancesEvenWhenContextIsNull(Routes tab, ITabContext context, RoutesInspector routeInspector, IInspectorContext routeInspectorContext) { context.Setup(x => x.GetRequestContext <HttpContextBase>()).Returns((HttpContextBase)null); System.Web.Routing.RouteTable.Routes.Clear(); System.Web.Routing.RouteTable.Routes.Ignore("Test"); routeInspectorContext.Setup(x => x.ProxyFactory).Returns(new CastleDynamicProxyFactory(routeInspectorContext.Logger, routeInspectorContext.MessageBroker, () => new ExecutionTimer(new Stopwatch()), () => new RuntimePolicy())); routeInspector.Setup(routeInspectorContext); var data = tab.GetData(context) as IList <RouteModel>; Assert.NotNull(data); Assert.Equal(System.Web.Routing.RouteTable.Routes.Count, data.Count); }
public void ReturnRouteInstancesEvenWhenContextIsNull(Routes tab, ITabContext context, RoutesInspector routeInspector, IInspectorContext routeInspectorContext) { context.Setup(x => x.GetRequestContext<HttpContextBase>()).Returns((HttpContextBase)null); System.Web.Routing.RouteTable.Routes.Clear(); System.Web.Routing.RouteTable.Routes.Ignore("Test"); routeInspectorContext.Setup(x => x.ProxyFactory).Returns(new CastleDynamicProxyFactory(routeInspectorContext.Logger, routeInspectorContext.MessageBroker, () => new ExecutionTimer(new Stopwatch()), () => new RuntimePolicy())); routeInspector.Setup(routeInspectorContext); var data = tab.GetData(context) as IList<RouteModel>; Assert.NotNull(data); Assert.Equal(System.Web.Routing.RouteTable.Routes.Count, data.Count); }
public void ReturnRouteInstancesEvenWhenContextIsNull(Routes tab, ITabContext context) { context.Setup(x => x.GetRequestContext<HttpContextBase>()).Returns((HttpContextBase)null); System.Web.Routing.RouteTable.Routes.Clear(); System.Web.Routing.RouteTable.Routes.Ignore("Test"); var data = tab.GetData(context) as IList<RouteModel>; Assert.NotNull(data); Assert.Equal(System.Web.Routing.RouteTable.Routes.Count, data.Count); }