using System.Windows; using Telemetry; namespace UndoTree.Tests; public sealed class HostIntegrationTests { [Fact] public void OutsideAWpfApplicationNoTelemetryIsStartedOrSent() { Assert.Null(Application.Current); UndoTreeTelemetry.EnsureStartedOnce(); UndoTreeTelemetry.Report(new InvalidOperationException()); Assert.Null(ProcessState.Read("DrainClaimed")); Assert.Null(ProcessState.Read("SentCount")); } [Fact] public void OutsideAWpfApplicationTheToolPluginCanStillBeCreated() { Assert.Null(Application.Current); var plugin = new UndoTreeToolPlugin(); Assert.Equal(Texts.UndoTree, plugin.Name); Assert.Null(ProcessState.Read("DrainClaimed")); } }