protected WindowViewEngineResult CreateResult(Type pageType, object parameters, object model) { var request = RequestBuilder.CreateRequest(); var options = new ViewResultOptions(parameters); options.Add("Model", model); return new WindowViewEngineResult( pageType, options, request.BuildControllerContext(), new DefaultViewActivator() ); }
protected WindowViewEngineResult CreateResult(object page, object parameters, object model) { var request = RequestBuilder.CreateRequest(); var options = new ViewResultOptions(parameters); options.Add("Model", model); var viewActivator = new Mock<IViewActivator>(); viewActivator.Setup(x => x.Instantiate(It.IsAny<Type>())).Returns(page); return new WindowViewEngineResult( page.GetType(), options, request.BuildControllerContext(), viewActivator.Object ); }