2 instantiations of ViewEngineResult
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewEngines\ViewEngineResult.cs (2)
56return new ViewEngineResult(viewName) 73return new ViewEngineResult(viewName)
331 references to ViewEngineResult
Microsoft.AspNetCore.Mvc.Razor (7)
RazorViewEngine.cs (7)
154public ViewEngineResult FindView(ActionContext context, string viewName, bool isMainPage) 163return ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>()); 171public ViewEngineResult GetView(string? executingFilePath, string viewPath, bool isMainPage) 178return ViewEngineResult.NotFound(viewPath, Enumerable.Empty<string>()); 455private ViewEngineResult CreateViewEngineResult(ViewLocationCacheResult result, string viewName) 459return ViewEngineResult.NotFound(viewName, result.SearchedLocations!); 477return ViewEngineResult.Found(viewName, view);
Microsoft.AspNetCore.Mvc.Razor.Test (42)
RazorViewEngineTest.cs (42)
75var result = viewEngine.FindView(context, viewName, isMainPage: true); 91var result = viewEngine.FindView(context, viewName, isMainPage: true); 107var result = viewEngine.FindView(context, "View.cshtml", isMainPage); 122var result = viewEngine.GetView("~/Home/View1.cshtml", "View2", isMainPage); 153var result = viewEngine.FindView(context, "test-view", isMainPage: false); 185var result1 = viewEngine.FindView(context, "test-view", isMainPage: false); 196var result2 = viewEngine.FindView(context, "test-view", isMainPage: false); 230var result = viewEngine.FindView(context, partialViewName, isMainPage: false); 246var result = viewEngine.FindView(context, partialViewName, isMainPage: false); 262var result = viewEngine.FindView(context, "viewName", isMainPage); 284var result = viewEngine.FindView(context, "viewName", isMainPage); 319var result = viewEngine.FindView(context, "test-view", isMainPage: true); 351var result = viewEngine.FindView(context, "test-view", isMainPage: true); 379var result = viewEngine.FindView(context, viewName, isMainPage: true); 405var result = viewEngine.GetView("/Home/Page.cshtml", viewName, isMainPage: true); 431var result = viewEngine.GetView("/Home/Page.cshtml", viewName, isMainPage: true); 459var result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: true); 487var result = viewEngine.GetView("/Home/Page.cshtml", viewName, isMainPage: true); 515var result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: true); 551var result1 = viewEngine.FindView(areaContext, "Index", isMainPage); 565var result2 = viewEngine.FindView(nonAreaContext, "Index", isMainPage); 576var result3 = viewEngine.FindView(areaContext, "Index", isMainPage); 577var result4 = viewEngine.FindView(nonAreaContext, "Index", isMainPage); 615var result1 = viewEngine.FindView(areaContext1, "Index", isMainPage); 630var result2 = viewEngine.FindView(areaContext2, "Index", isMainPage); 641var result3 = viewEngine.FindView(areaContext1, "Index", isMainPage); 642var result4 = viewEngine.FindView(areaContext2, "Index", isMainPage); 711var result = viewEngine.FindView(context, "test-view", isMainPage: true); 779var result = viewEngine.FindView(context, "test-view", isMainPage: true); 812var result = viewEngine.FindView(context, "test-view", isMainPage: true); 839var result1 = viewEngine.FindView(context, "baz", isMainPage: true); 852var result2 = viewEngine.FindView(context, "baz", isMainPage: true); 876var result1 = viewEngine.FindView(context, "baz", isMainPage: false); 889var result2 = viewEngine.FindView(context, "baz", isMainPage: false); 927var result1 = viewEngine.FindView(context, "baz", isMainPage: true); 936var result2 = viewEngine.FindView(context, "baz", isMainPage: true); 979var result = viewEngine.FindView(context, "myview", isMainPage: true); 1038var result = viewEngine.FindView(context, "MyView", isMainPage: true); 1914var result = viewEngine.FindView(context, "../Shared/_Partial", isMainPage: false); 1954var result = viewEngine.FindView(context, "MyView", isMainPage: true); 1998var result = viewEngine.FindView(context, "Index", isMainPage: false); 2016var result = viewEngine.FindView(context, "Index", isMainPage: false);
Microsoft.AspNetCore.Mvc.TagHelpers (4)
PartialTagHelper.cs (4)
112var result = FindView(Name); 180private ViewEngineResult FindView(string partialName) 182var viewEngineResult = _viewEngine.GetView(ViewContext.ExecutingFilePath, partialName, isMainPage: false); 192return ViewEngineResult.NotFound(partialName, searchedLocations);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (29)
PartialTagHelperTest.cs (29)
168.Returns(ViewEngineResult.Found(partialName, view.Object)); 206.Returns(ViewEngineResult.NotFound(partialName, new[] { partialName })); 209.Returns(ViewEngineResult.Found(partialName, view.Object)); 247.Returns(ViewEngineResult.NotFound(partialName, new[] { partialName })); 250.Returns(ViewEngineResult.Found(partialName, view.Object)); 291.Returns(ViewEngineResult.Found(partialName, view.Object)); 340.Returns(ViewEngineResult.Found(partialName, view.Object)); 386.Returns(ViewEngineResult.Found(partialName, view.Object)); 433.Returns(ViewEngineResult.Found(partialName, view.Object)); 473.Returns(ViewEngineResult.Found(partialName, view.Object)); 513.Returns(ViewEngineResult.Found(partialName, view.Object)); 548.Returns(ViewEngineResult.Found(partialName, view.Object)); 584.Returns(ViewEngineResult.NotFound(partialName, new[] { "NotFound1", "NotFound2" })); 587.Returns(ViewEngineResult.NotFound(partialName, new[] { $"NotFound3", $"NotFound4" })); 625.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 627.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 675.Returns(ViewEngineResult.Found(partialName, view.Object)); 677.Returns(ViewEngineResult.Found(fallbackName, fallbackView.Object)); 721.Returns(ViewEngineResult.NotFound(partialName, new[] { "PartialNotFound1", "PartialNotFound2" })); 724.Returns(ViewEngineResult.NotFound(partialName, new[] { $"PartialNotFound3", $"PartialNotFound4" })); 727.Returns(ViewEngineResult.NotFound(partialName, new[] { "FallbackNotFound1", "FallbackNotFound2" })); 730.Returns(ViewEngineResult.NotFound(partialName, new[] { $"FallbackNotFound3", $"FallbackNotFound4" })); 769.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 771.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 773.Returns(ViewEngineResult.Found(fallbackName, view.Object)); 813.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 815.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 817.Returns(ViewEngineResult.NotFound(fallbackName, Array.Empty<string>())); 819.Returns(ViewEngineResult.Found(fallbackName, view.Object));
Microsoft.AspNetCore.Mvc.ViewFeatures (31)
HtmlHelper.cs (1)
512var viewEngineResult = _viewEngine.GetView(
PartialViewResultExecutor.cs (6)
60/// <returns>A <see cref="ViewEngineResult"/>.</returns> 61public virtual ViewEngineResult FindView(ActionContext actionContext, PartialViewResult viewResult) 71var result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: false); 72var originalResult = result; 88result = ViewEngineResult.NotFound(viewName, locations); 152var viewEngineResult = FindView(context, result);
TemplateRenderer.cs (1)
106var viewEngineResult = _viewEngine.GetView(_viewContext.ExecutingFilePath, viewName, isMainPage: false);
ViewComponents\ViewViewComponentResult.cs (1)
76ViewEngineResult? result = null;
ViewEngines\CompositeViewEngine.cs (6)
28public ViewEngineResult FindView(ActionContext context, string viewName, bool isMainPage) 46var result = ViewEngines[i].FindView(context, viewName, isMainPage); 74return ViewEngineResult.NotFound(viewName, searchedLocations ?? Enumerable.Empty<string>()); 78public ViewEngineResult GetView(string? executingFilePath, string viewPath, bool isMainPage) 95var result = ViewEngines[i].GetView(executingFilePath, viewPath, isMainPage); 122return ViewEngineResult.NotFound(viewPath, searchedLocations ?? Enumerable.Empty<string>());
ViewEngines\IViewEngine.cs (4)
20/// <returns>The <see cref="ViewEngineResult"/> of locating the view.</returns> 23ViewEngineResult FindView(ActionContext context, string viewName, bool isMainPage); 32/// <returns>The <see cref="ViewEngineResult"/> of locating the view.</returns> 33ViewEngineResult GetView(string? executingFilePath, string viewPath, bool isMainPage);
ViewEngines\ViewEngineResult.cs (5)
49public static ViewEngineResult NotFound( 68public static ViewEngineResult Found(string viewName, IView view) 80/// Ensure this <see cref="ViewEngineResult"/> was successful. 89/// <returns>This <see cref="ViewEngineResult"/> if <see cref="Success"/> is <c>true</c>.</returns> 91public ViewEngineResult EnsureSuccessful(IEnumerable<string>? originalLocations)
ViewResultExecutor.cs (7)
60/// <returns>A <see cref="ViewEngineResult"/>.</returns> 61public virtual ViewEngineResult FindView(ActionContext actionContext, ViewResult viewResult) 72var result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: true); 73var originalResult = result; 89result = ViewEngineResult.NotFound(viewName, locations); 116private void OutputDiagnostics(ActionContext actionContext, ViewResult viewResult, string viewName, ViewEngineResult result) 146var viewEngineResult = FindView(context, result);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (218)
DefaultDisplayTemplatesTest.cs (14)
127.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 130.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 262.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 265.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 284.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 287.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 306.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 309.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 329.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 332.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 358.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 361.Returns(ViewEngineResult.Found("test-view", view.Object)); 377.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 380.Returns(ViewEngineResult.Found(string.Empty, new Mock<IView>().Object))
DefaultEditorTemplatesTest.cs (38)
357.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 360.Returns(ViewEngineResult.NotFound("", Enumerable.Empty<string>())); 575.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 578.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 608.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 611.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 640.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 643.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 683.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 686.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 725.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 728.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 768.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 771.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 809.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 812.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 847.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 850.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 913.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 916.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 984.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 987.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1054.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1057.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1123.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1126.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1189.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1192.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1226.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1229.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1250.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1253.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1275.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1278.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1306.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1309.Returns(ViewEngineResult.Found("test-view", view.Object)); 1325.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 1328.Returns(ViewEngineResult.Found(string.Empty, new Mock<IView>().Object))
PartialViewResultExecutorTest.cs (20)
32.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 36.Returns(ViewEngineResult.Found(viewName, Mock.Of<IView>())) 48var viewEngineResult = executor.FindView(context, viewResult); 70var viewEngineResult = executor.FindView(context, viewResult); 94var viewEngineResult = executor.FindView(context, viewResult); 112.Returns(ViewEngineResult.NotFound("myview", expectedLocations)) 116.Returns(ViewEngineResult.NotFound("myview", Enumerable.Empty<string>())); 127var result = executor.FindView(context, viewResult); 147.Returns(ViewEngineResult.NotFound("myview", Enumerable.Empty<string>())) 151.Returns(ViewEngineResult.NotFound("myview", expectedLocations)); 162var result = executor.FindView(context, viewResult); 182.Returns(ViewEngineResult.NotFound("myview", new[] { "location1", "location2" })) 186.Returns(ViewEngineResult.NotFound("myview", new[] { "location3", "location4" })); 197var result = executor.FindView(context, viewResult); 225var viewEngineResult = executor.FindView(context, viewResult); 253.Returns(ViewEngineResult.NotFound("myview", Enumerable.Empty<string>())) 257.Returns(ViewEngineResult.NotFound("myview", new string[] { "location/myview" })); 268var viewEngineResult = executor.FindView(context, viewResult); 352(executing, name, isMainPage) => ViewEngineResult.NotFound(name, Enumerable.Empty<string>())); 356(context, name, isMainPage) => ViewEngineResult.Found(name, Mock.Of<IView>()));
PartialViewResultTest.cs (8)
75.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location1", "Location2" })) 80.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 113.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 118.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location1", "Location2" })) 153.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location1", "Location2" })) 158.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location3", "Location4" })) 202.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 207.Returns(ViewEngineResult.Found(viewName, view.Object))
Rendering\DefaultTemplatesUtilities.cs (2)
318.Returns(ViewEngineResult.NotFound("MyView", Enumerable.Empty<string>())) 322.Returns(ViewEngineResult.Found("MyView", view.Object))
Rendering\HtmlHelperDisplayExtensionsTest.cs (34)
26.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 29.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 57.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 60.Returns(ViewEngineResult.Found("SomeView", view.Object)); 78.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 81.Returns(ViewEngineResult.Found("SomeView", Mock.Of<IView>())) 140.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 143.Returns(ViewEngineResult.Found("Status", view.Object)) 166.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 169.Returns(ViewEngineResult.Found("Status", view.Object)) 192.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 195.Returns(ViewEngineResult.Found("SomeView", view.Object)); 220.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 223.Returns(ViewEngineResult.Found("SomeView", view.Object)); 248.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 251.Returns(ViewEngineResult.Found("SomeView", view.Object)); 269.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 272.Returns(ViewEngineResult.Found("SomeView", Mock.Of<IView>())) 295.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 298.Returns(ViewEngineResult.Found("SomeView", view.Object)); 326.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 329.Returns(ViewEngineResult.Found("SomeView", view.Object)); 367.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 370.Returns(ViewEngineResult.Found("SomeView", view.Object)); 392.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 395.Returns(ViewEngineResult.Found("SomeView", view.Object)); 420.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 423.Returns(ViewEngineResult.Found("SomeView", view.Object)); 441.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 444.Returns(ViewEngineResult.Found("SomeView", Mock.Of<IView>())) 467.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 470.Returns(ViewEngineResult.Found("SomeView", view.Object)); 494.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 497.Returns(ViewEngineResult.Found("SomeView", view.Object));
Rendering\HtmlHelperEditorExtensionsTest.cs (4)
24.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 27.Returns(ViewEngineResult.Found("Status", view.Object)) 50.Returns(ViewEngineResult.NotFound(string.Empty, Enumerable.Empty<string>())); 53.Returns(ViewEngineResult.Found("Status", view.Object))
Rendering\HtmlHelperPartialExtensionsTest.cs (12)
409.Returns(ViewEngineResult.NotFound("test-view", new[] { "location1", "location2" })) 413.Returns(ViewEngineResult.NotFound("test-view", Enumerable.Empty<string>())) 438.Returns(ViewEngineResult.NotFound("test-view", Enumerable.Empty<string>())) 442.Returns(ViewEngineResult.NotFound("test-view", new[] { "location1", "location2" })) 469.Returns(ViewEngineResult.NotFound("test-view", new[] { "location1", "location2" })) 473.Returns(ViewEngineResult.NotFound("test-view", new[] { "location3", "location4" })) 498.Returns(ViewEngineResult.NotFound("test-view", new[] { "location1", "location2" })) 502.Returns(ViewEngineResult.NotFound("test-view", Enumerable.Empty<string>())) 527.Returns(ViewEngineResult.NotFound("test-view", Enumerable.Empty<string>())) 531.Returns(ViewEngineResult.NotFound("test-view", new[] { "location1", "location2" })) 558.Returns(ViewEngineResult.NotFound("test-view", new[] { "location1", "location2" })) 562.Returns(ViewEngineResult.NotFound("test-view", new[] { "location3", "location4" }))
ViewComponents\ViewViewComponentResultTest.cs (20)
37.Returns(ViewEngineResult.NotFound("some-view", Enumerable.Empty<string>())) 41.Returns(ViewEngineResult.Found("Components/Invoke/some-view", view.Object)) 76.Returns(ViewEngineResult.Found("Components/Invoke/Default", view.Object)) 110.Returns(ViewEngineResult.Found("Components/Invoke/Default", view.Object)) 155.Returns(ViewEngineResult.NotFound("some-view", new[] { "location1", "location2" })) 159.Returns(ViewEngineResult.NotFound("Components/Invoke/some-view", Enumerable.Empty<string>())) 193.Returns(ViewEngineResult.NotFound("some-view", Enumerable.Empty<string>())) 197.Returns(ViewEngineResult.NotFound("Components/Invoke/some-view", new[] { "location1", "location2" })) 233.Returns(ViewEngineResult.NotFound("some-view", new[] { "location1", "location2" })) 237.Returns(ViewEngineResult.NotFound("Components/Invoke/some-view", new[] { "location3", "location4" })) 271.Returns(ViewEngineResult.NotFound("some-view", Enumerable.Empty<string>())) 275.Returns(ViewEngineResult.Found("Components/Invoke/some-view", view.Object)) 307.Returns(ViewEngineResult.NotFound("some-view", Enumerable.Empty<string>())) 311.Returns(ViewEngineResult.Found("Components/Invoke/some-view", view)) 342.Returns(ViewEngineResult.NotFound("some-view", Enumerable.Empty<string>())) 346.Returns(ViewEngineResult.Found("Components/Invoke/some-view", view)) 391.Returns(ViewEngineResult.NotFound("some-view", new[] { "view-location1", "view-location2" })) 395.Returns(ViewEngineResult.NotFound( 461.Returns(ViewEngineResult.Found(expectedViewName, new Mock<IView>().Object)) 485.Returns(ViewEngineResult.Found(viewName, new Mock<IView>().Object))
ViewEngines\CompositeViewEngineTest.cs (38)
57.Returns(ViewEngineResult.NotFound(viewName, new[] { "controller/test-view" })); 63var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true); 79.Returns(ViewEngineResult.Found(viewName, view)); 85var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true); 104.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())); 107.Returns(ViewEngineResult.Found(viewName, view2)); 110.Returns(ViewEngineResult.Found(viewName, view3)); 119var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true); 137.Returns(ViewEngineResult.NotFound(viewName, new[] { "1", "2" })); 140.Returns(ViewEngineResult.NotFound(viewName, new[] { "3" })); 143.Returns(ViewEngineResult.NotFound(viewName, new[] { "4", "5" })); 152var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true); 189.Returns(ViewEngineResult.NotFound(expectedViewName, new[] { expectedViewName })); 195var result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage); 214.Returns(ViewEngineResult.Found(expectedViewName, view)); 220var result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage); 242.Returns(ViewEngineResult.NotFound(expectedViewName, Enumerable.Empty<string>())); 245.Returns(ViewEngineResult.Found(expectedViewName, view2)); 248.Returns(ViewEngineResult.Found(expectedViewName, view3)); 257var result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage); 278.Returns(ViewEngineResult.NotFound(expectedViewName, new[] { "1", "2" })); 281.Returns(ViewEngineResult.NotFound(expectedViewName, new[] { "3" })); 284.Returns(ViewEngineResult.NotFound(expectedViewName, new[] { "4", "5" })); 293var result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage); 324.Returns(ViewEngineResult.NotFound(viewName, new[] { "Shared/partial-view" })); 330var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false); 346.Returns(ViewEngineResult.Found(viewName, view)); 352var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false); 371.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())); 374.Returns(ViewEngineResult.Found(viewName, view2)); 377.Returns(ViewEngineResult.Found(viewName, view3)); 386var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false); 404.Returns(ViewEngineResult.NotFound(viewName, new[] { "1", "2" })); 407.Returns(ViewEngineResult.NotFound(viewName, new[] { "3" })); 410.Returns(ViewEngineResult.NotFound(viewName, new[] { "4", "5" })); 419var result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false); 440public ViewEngineResult FindView(ActionContext context, string viewName, bool isMainPage) 445public ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage)
ViewResultExecutorTest.cs (20)
31.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 35.Returns(ViewEngineResult.Found(viewName, Mock.Of<IView>())) 47var viewEngineResult = executor.FindView(context, viewResult); 69var viewEngineResult = executor.FindView(context, viewResult); 93var viewEngineResult = executor.FindView(context, viewResult); 111.Returns(ViewEngineResult.NotFound("myview", expectedLocations)); 114.Returns(ViewEngineResult.NotFound("myview", Enumerable.Empty<string>())); 125var result = executor.FindView(context, viewResult); 145.Returns(ViewEngineResult.NotFound("myview", Enumerable.Empty<string>())); 148.Returns(ViewEngineResult.NotFound("myview", expectedLocations)); 159var result = executor.FindView(context, viewResult); 179.Returns(ViewEngineResult.NotFound("myview", new[] { "location1", "location2" })); 182.Returns(ViewEngineResult.NotFound("myview", new[] { "location3", "location4" })); 193var result = executor.FindView(context, viewResult); 221var viewEngineResult = executor.FindView(context, viewResult); 249.Returns(ViewEngineResult.NotFound("myview", Enumerable.Empty<string>())); 252.Returns(ViewEngineResult.NotFound("myview", new string[] { "location/myview" })); 263var viewEngineResult = executor.FindView(context, viewResult); 342(path, name, partial) => ViewEngineResult.NotFound(name, Enumerable.Empty<string>())); 346(context, name, partial) => ViewEngineResult.Found(name, Mock.Of<IView>()));
ViewResultTest.cs (8)
85.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 90.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location1", "Location2" })) 125.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location1", "Location2" })) 130.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location3", "Location4" })) 165.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location1", "Location2" })) 170.Returns(ViewEngineResult.NotFound(viewName, new[] { "Location3", "Location4" })) 214.Returns(ViewEngineResult.NotFound(viewName, Enumerable.Empty<string>())) 219.Returns(ViewEngineResult.Found(viewName, view.Object))