62 references to Require
aspire-tray (62)
NativeSmokeHarness.cs (38)
90Require(uri.AbsoluteUri == "http://localhost:19001/", "Unexpected dashboard URL."); 97Require(error is InvalidOperationException, "Unexpected action failure in smoke."); 107Require(launch.WorkingDirectory == folder && launch.ArgumentList.SequenceEqual(["-d", "."]), 109Require(!_application.WaitUntilReadyAsync(_shutdown.Token).IsCompleted, "Readiness completed without a running native loop."); 113Require(_finished, "Smoke exited before completing its assertions."); 140Require(_application.WaitUntilReadyAsync(_shutdown.Token).IsCompletedSuccessfully, "Native loop readiness was not acknowledged."); 149Require(_application.IconAddFailuresForSmoke == 0, "Readiness was acknowledged before icon creation recovered."); 151Require(state.Discovery == DiscoveryState.Connecting && !state.HasActiveAppHosts, "Initial native state is incorrect."); 163Require(_client.Starts.IsEmpty, "Listing a recent AppHost started it automatically."); 168Require(_copiedPaths.SequenceEqual(_hosts.Select(host => host.AppHostPath) 172Require(_dashboardCalls == 1, "The panel's Dashboard button did not reach the URL handler."); 174Require(_documentationCalls == 1, "Documentation did not use aspire.dev."); 178Require(_controller.State.AppHosts.Single(host => host.Id == _hosts[0].Id).IsPinned, "Pin from the action list did not persist."); 200Require(_errors == 1 && _client.Stops.Count == 1, "A stale action stopped a replacement lifetime."); 204Require(stopPanel.Confirmation is null, "Stop opened a confirmation dialog."); 216Require(stops.Length == 2 && stops.Contains(_hosts[0].Id) && stops.Contains(_hosts[2].Id), 220Require(_application.PanelForSmoke.Confirmation == PanelConfirmKind.RemoveMissing, "A missing recent AppHost was not offered for removal inline."); 222Require(_controller.State.RecentAppHosts.Any(host => host.Id == missing.Id), "Cancel removed a missing recent path."); 225Require(_controller.State.RecentAppHosts.All(host => host.Id != missing.Id), "Missing recent path was not removed."); 235Require(_client.Starts.Single() == _pinned, "Explicit Start did not preserve the selected path and casing."); 239Require(_application.PanelForSmoke.Confirmation == PanelConfirmKind.ClearRecent, "Clear did not ask inline."); 241Require(ReferenceEquals(saved, _store.Load()), "Cancel changed recent history."); 244Require(_store.Load().AppHosts.All(host => host.IsPinned && !host.IsRecent) 255Require(_store.Load().AppHosts.All(host => !TrayAppHostPath.Comparer.Equals(host.AppHostPath, _missingPin)), 289Require(_dashboardCalls == 2, "A started AppHost did not gain an actionable dashboard button."); 309Require(state.AppHosts.All(host => !host.CanStop && !host.CanStart), "Disconnected rows allow lifecycle actions."); 342Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 0, "Smoke startup preferences must default off."); 346Require(_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 1, "The switch did not enable the isolated setting."); 348Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 2, "The switch did not disable the setting."); 353Require(_startupSettings.WriteCount == 2, "An unavailable startup setting was enabled."); 357Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 3, 364Require(!_startupSettings.Store.Read().Enabled && _startupSettings.WriteCount == 4, "A failed write produced a phantom enabled setting."); 365Require(_application.PanelForSmoke.Scene.Accessibility.Single(element => element.Target?.Kind == PanelTargetKind.LaunchAtSignIn) 371Require(_startupSettings.WriteCount == 4, "Opening an unknown startup state attempted registration."); 375Require(_documentationCalls == 0, "Settings unexpectedly opened documentation."); 376Require(_startupSettings.WriteCount == 4 && !_startupSettings.Store.Read().Enabled, "Closing Settings changed startup state."); 422Require(!enabled || CanEnable, "Startup enabling is unavailable."); 443=> 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 435NativeSmokeHarness.Require(rows.Select(row => row.Host!.Id).SequenceEqual( 442NativeSmokeHarness.Require(row.AccessibleName.StartsWith($"{host.DisplayName}, ", StringComparison.Ordinal) 446NativeSmokeHarness.Require(_iconData.CallbackMessage == NativeMethods.TrayCallback, "The icon must report activations to the panel."); 447NativeSmokeHarness.Require(panel.Scene.Accessibility.Single(element => element.Key.Label == "header.status").Bounds.CenterY == TrayPanel.HeaderHeight / 2 449NativeSmokeHarness.Require(_panelTooltip != 0 && _panelTooltips.Select(tooltip => tooltip.Text).SequenceEqual( 453NativeSmokeHarness.Require(panel.Scene.Accessibility.Single(element => element.Target?.Kind == PanelTargetKind.Quit) is