using DodoSSH.Client.App.Views; namespace DodoSSH.Client.App.Layout.Tests; /// /// The Linux device-key PIN window, which no other test constructs. /// /// /// It named two palette resources that have never existed, Surface and MutedText, and a /// StaticResource that cannot be found throws when the window is built — so on the one platform that /// shows it, registering or unlocking with the TPM failed before any PIN was asked for. Only constructing it /// against the real palette can catch that, which is what the harness's application provides. /// public sealed class DevicePinWindowTests { private static CancellationToken Token => TestContext.Current.CancellationToken; [Fact] public async Task TheWindowBuildsAgainstThePalette() { await LayoutHarness.OnTheUiThreadAsync( () => { var window = new DevicePinWindow(); try { LayoutHarness.Settle(window, window.Width, 240); LayoutHarness.Unreachable(window).ShouldBeEmpty(); } finally { window.Close(); } }, Token); } }