61 references to Require
aspire-tray (61)
NativeSmokeHarness.cs (37)
89Require(uri.AbsoluteUri == "http://localhost:19001/", "Unexpected dashboard URL."); 96Require(error is InvalidOperationException, "Unexpected action failure in smoke."); 106Require(launch.WorkingDirectory == folder && launch.ArgumentList.SequenceEqual(["-d", "."]), 108Require(!_application.WaitUntilReadyAsync(_shutdown.Token).IsCompleted, "Readiness completed without a running native loop."); 112Require(_finished, "Smoke exited before completing its assertions."); 139Require(_application.WaitUntilReadyAsync(_shutdown.Token).IsCompletedSuccessfully, "Native loop readiness was not acknowledged."); 148Require(_application.IconAddFailuresForSmoke == 0, "Readiness was acknowledged before icon creation recovered."); 150Require(state.Discovery == DiscoveryState.Connecting && !state.HasActiveAppHosts, "Initial native state is incorrect."); 162Require(_client.Starts.IsEmpty, "Listing a recent AppHost started it automatically."); 167Require(_copiedPaths.SequenceEqual(_hosts.Select(host => host.AppHostPath) 171Require(_dashboardCalls == 1, "The panel's Dashboard button did not reach the URL handler."); 173Require(_documentationCalls == 1, "Documentation did not use aspire.dev."); 177Require(_controller.State.AppHosts.Single(host => host.Id == _hosts[0].Id).IsPinned, "Pin from the action list did not persist."); 199Require(_errors == 1 && _client.Stops.Count == 1, "A stale action stopped a replacement lifetime."); 202Require(_client.Stops.Count == 2, "Stop did not send its request without a dialog."); 205Require(_application.PanelForSmoke.Confirmation == PanelConfirmKind.RemoveMissing, "A missing recent AppHost was not offered for removal inline."); 207Require(_controller.State.RecentAppHosts.Any(host => host.Id == missing.Id), "Cancel removed a missing recent path."); 210Require(_controller.State.RecentAppHosts.All(host => host.Id != missing.Id), "Missing recent path was not removed."); 220Require(_client.Starts.Single() == _pinned, "Explicit Start did not preserve the selected path and casing."); 224Require(_application.PanelForSmoke.Confirmation == PanelConfirmKind.ClearRecent, "Clear did not ask inline."); 226Require(ReferenceEquals(saved, _store.Load()), "Cancel changed recent history."); 229Require(_store.Load().AppHosts.All(host => host.IsPinned && !host.IsRecent) 240Require(_store.Load().AppHosts.All(host => !TrayAppHostPath.Comparer.Equals(host.AppHostPath, _missingPin)), 274Require(_dashboardCalls == 2, "A started AppHost did not gain an actionable dashboard button."); 294Require(state.AppHosts.All(host => !host.CanStop && !host.CanStart), "Disconnected rows allow lifecycle actions."); 327Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 0, "Smoke startup preferences must default off."); 331Require(_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 1, "The switch did not enable the isolated setting."); 333Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 2, "The switch did not disable the setting."); 338Require(_startupSettings.WriteCount == 2, "An unavailable startup setting was enabled."); 342Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 3, 349Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 4, "A failed write produced a phantom enabled setting."); 350Require(_application.PanelForSmoke.Scene.Accessibility.Single(element => element.Target?.Kind == PanelTargetKind.LaunchAtSignIn) 356Require(_startupSettings.WriteCount == 4, "Opening an unknown startup state attempted registration."); 360Require(_documentationCalls == 0, "Settings unexpectedly opened documentation."); 361Require(_startupSettings.WriteCount == 4 && !_startupSettings.Store.Read().Enabled, "Closing Settings changed startup state."); 407Require(!enabled || CanEnable, "Startup enabling is unavailable."); 428=> Require(_snapshots.Writer.TryWrite(snapshot), "The smoke snapshot channel is closed.");
TrayApplication.NativeSmoke.cs (24)
180NativeSmokeHarness.Require((defaultId & 0xFFFF) == (uint)pending.DefaultId && (defaultId >> 16) == 0x534B, 255NativeSmokeHarness.Require(_panel!.ActionsRow is null, "Picking an action must close the action list."); 272NativeSmokeHarness.Require(panel.ActionsRow == (row.Key.Section, host) && items.Select(target => target.AccessibleName).SequenceEqual(expected), 275NativeSmokeHarness.Require(panel.FocusedTarget == items[0].Key, "Down must move from the More button into the action list."); 280NativeSmokeHarness.Require(panel.Scene.Targets.Where(target => target.Kind == PanelTargetKind.OpenIn).Select(target => target.AccessibleName) 287NativeSmokeHarness.Require(panel.FocusedTarget == items[0].Key && !panel.Scene.Targets.Any(target => target.Kind == PanelTargetKind.OpenIn), 291NativeSmokeHarness.Require(panel.ActionsRow is null && _panelVisible && panel.FocusedTarget?.Kind == PanelTargetKind.More, 329NativeSmokeHarness.Require(_panelVisible && (_panel!.FocusedTarget is not null) == keyboard, 333NativeSmokeHarness.Require(_panelVisible, "A repeated activation closed the panel it had just opened."); 336NativeSmokeHarness.Require(!_panelVisible, "Activating the icon again must close the panel."); 340NativeSmokeHarness.Require(!_panel!.IsSettingsOpen, "Settings opened unexpectedly."); 361NativeSmokeHarness.Require(_panel.IsSettingsOpen, "Ctrl+comma must open the Settings view in the panel."); 363NativeSmokeHarness.Require(!_panel.IsSettingsOpen && _panelVisible, "Escape must leave the Settings view and keep the panel open."); 385NativeSmokeHarness.Require(toggle.Role == PanelAccessibleRole.Switch && toggle.Checked == on && toggle.Enabled == enabled 410NativeSmokeHarness.Require(_iconAdded, "Explorer restart did not restore the native icon."); 424NativeSmokeHarness.Require(_artwork is { Original: not 0, Running: not 0, Attention: not 0, Dimmed: not 0 }, 426NativeSmokeHarness.Require(_iconAdded && _iconData.Icon == _artwork!.TrayIcon(TrayIconStatusRules.Get(state)), 429NativeSmokeHarness.Require(Enum.GetValues<TrayIconStatus>().Select(_artwork!.TrayIcon).Distinct().Count() == 4 434NativeSmokeHarness.Require(rows.Select(row => row.Host!.Id).SequenceEqual( 441NativeSmokeHarness.Require(row.AccessibleName.StartsWith($"{host.DisplayName}, ", StringComparison.Ordinal) 445NativeSmokeHarness.Require(_iconData.CallbackMessage == NativeMethods.TrayCallback, "The icon must report activations to the panel."); 446NativeSmokeHarness.Require(panel.Scene.Accessibility.Single(element => element.Key.Label == "header.status").Bounds.CenterY == TrayPanel.HeaderHeight / 2 448NativeSmokeHarness.Require(_panelTooltip != 0 && _panelTooltips.Select(tooltip => tooltip.Text).SequenceEqual( 452NativeSmokeHarness.Require(panel.Scene.Accessibility.Single(element => element.Target?.Kind == PanelTargetKind.Quit) is