public static class RunicNavigationPathTesting Saves and restores navigation paths in tests, as an application does across a restart.
Methods
RestorePathAsync
public static Task<RunicNavigationRestore> RestorePathAsync(this RunicNavigator navigator, string saved, NavigationRestoreOptions? options = null, CancellationToken cancellationToken = default) Restores saved, a path RunicNavigationPathTesting.SavePath returned, into navigator, and reads the path back: RunicNavigationRestore.IsExact tells whether the restored navigation is the saved one.
Parameters
navigatorThe navigator of the window after the restart.
savedThe saved JSON.
optionsThe restore's options, such as its route map; the defaults without them.
cancellationTokenCancels the restore.
SavePath
public static string SavePath(this RunicNavigator navigator, INavigationRouteMap? routes = null) Saves navigator's path through its JSON form, as an application's store would keep it, so the restore in a new window scope reads what a restart reads.
Parameters
navigatorThe navigator of the window before the restart.
routesThe route map, or
nullfor the navigator's registered one.