WPFアプリケーションの外での挙動の試験を追加する

このコミットが含まれているのは:
routersys committed 2026-10-12 01:09:22 +09:00
1 親 95aa383011
コミット 4c985e7bca
1ファイル変更
+30
+30
ファイルの表示
@@ -0,0 +1,30 @@
using System.Windows;
using Telemetry;
namespace SpectrumColorShift.Tests;
public sealed class HostIntegrationTests
{
[Fact]
public void OutsideAWpfApplicationNoTelemetryIsStartedOrSent()
{
Assert.Null(Application.Current);
SpectrumColorShiftTelemetry.EnsureStartedOnce();
SpectrumColorShiftTelemetry.Report(new InvalidOperationException());
Assert.Null(ProcessState.Read("DrainClaimed"));
Assert.Null(ProcessState.Read("SentCount"));
}
[Fact]
public void OutsideAWpfApplicationTheEffectCanStillBeCreated()
{
Assert.Null(Application.Current);
var effect = new SpectrumColorShiftEffect();
Assert.Equal(Texts.SpectrumColorShift, effect.Label);
Assert.Null(ProcessState.Read("DrainClaimed"));
}
}