public void ShouldSetResetHistory() { var result = new PageResult("MyWindow", null, new ViewEngineCollection()).ClearNavigationHistory(); Assert.AreEqual(true, result.Options["ResetNavigationHistory"]); }
/// <summary> /// Navigates using the current navigation service to a page with the specified name. For example, /// if the page name is "CustomerDetails", it will try to resolve and navigate to a WPF page named /// CustomerDetails, CustomerDetailsPage, CustomerDetailsView, and other combinations (see the /// <see cref="PageViewEngine"/> for details). /// </summary> /// <param name="viewName">Name of the view.</param> /// <param name="model">The model.</param> /// <returns>A <see cref="PageResult"/>.</returns> public virtual PageResult Page(string viewName, object model) { var result = new PageResult(viewName, model, ViewEngines); return result; }
public void ShouldSetViewTypeToPage() { var result = new PageResult("MyWindow", false, new ViewEngineCollection()); Assert.AreEqual("Page", result.Options["ViewType"]); }