using Xunit; namespace LanMountainDesktop.Tests; public sealed class FusedDesktopComponentLibraryWindowShellTests { [Fact] public void Window_UsesTransparentFullClientArea() { var xaml = ReadRepositoryFile( "desktop", "LanMountainDesktop", "Views", "FusedDesktopComponentLibraryWindow.axaml"); var window = ExtractElementStart(xaml, "= 0, $"Could not find '{startToken}'."); var end = source.IndexOf('>', start); Assert.True(end > start, $"Could not find end of '{startToken}'."); return source.Substring(start, end - start + 1); } private static string ReadRepositoryFile(params string[] segments) { var directory = new DirectoryInfo(AppContext.BaseDirectory); while (directory is not null) { var candidate = Path.Combine(new[] { directory.FullName }.Concat(segments).ToArray()); if (File.Exists(candidate)) { return File.ReadAllText(candidate); } if (File.Exists(Path.Combine(directory.FullName, "LanMountainDesktop.slnx"))) { break; } directory = directory.Parent; } throw new FileNotFoundException($"Could not locate repository file '{Path.Combine(segments)}'."); } }