WPFアプリケーションの外でテレメトリーを送らない試験を追加する
このコミットが含まれているのは:
1ファイル変更
+14
@@ -1,10 +1,23 @@
|
||||
using System.Windows;
|
||||
using Telemetry;
|
||||
using WaveOptics.Effects;
|
||||
|
||||
namespace WaveOptics.Tests;
|
||||
|
||||
public sealed class HostIntegrationTests
|
||||
{
|
||||
[Fact]
|
||||
public void OutsideAWpfApplicationNoTelemetryIsStartedOrSent()
|
||||
{
|
||||
Assert.Null(Application.Current);
|
||||
|
||||
WaveOpticsTelemetry.EnsureStartedOnce();
|
||||
WaveOpticsTelemetry.Report(new InvalidOperationException());
|
||||
|
||||
Assert.Null(ProcessState.Read("DrainClaimed"));
|
||||
Assert.Null(ProcessState.Read("SentCount"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OutsideAWpfApplicationTheEffectCanStillBeCreated()
|
||||
{
|
||||
@@ -13,5 +26,6 @@ public sealed class HostIntegrationTests
|
||||
var effect = new WaveOpticsEffect();
|
||||
|
||||
Assert.Equal(Texts.WaveOptics, effect.Label);
|
||||
Assert.Null(ProcessState.Read("DrainClaimed"));
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする