From fa78ee0e74672d648c1ef91a6dfdd98354d3b4f5 Mon Sep 17 00:00:00 2001 From: Michael Render Date: Thu, 19 Dec 2024 17:08:15 -0500 Subject: [PATCH] [dotnet] Correct assertion of struct type in internal tests (#14878) --- dotnet/test/common/DevTools/DevToolsProfilerTest.cs | 6 +++--- dotnet/test/common/DevTools/DevToolsTestFixture.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs index 985a336e2c94e..a663278e7bc69 100644 --- a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs +++ b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs @@ -131,12 +131,12 @@ private void ValidateProfile(CurrentCdpVersion.Profiler.Profile profiler) { Assert.That(profiler, Is.Not.Null); Assert.That(profiler.Nodes, Is.Not.Null); - Assert.That(profiler.StartTime, Is.Not.Null); - Assert.That(profiler.EndTime, Is.Not.Null); + Assert.That(profiler.StartTime, Is.Not.Zero); + Assert.That(profiler.EndTime, Is.Not.Zero); Assert.That(profiler.TimeDeltas, Is.Not.Null); foreach (var delta in profiler.TimeDeltas) { - Assert.That(delta, Is.Not.Null); + Assert.That(delta, Is.Not.Zero); } foreach (var node in profiler.Nodes) diff --git a/dotnet/test/common/DevTools/DevToolsTestFixture.cs b/dotnet/test/common/DevTools/DevToolsTestFixture.cs index 18bb78988557f..44f2317370420 100644 --- a/dotnet/test/common/DevTools/DevToolsTestFixture.cs +++ b/dotnet/test/common/DevTools/DevToolsTestFixture.cs @@ -39,7 +39,7 @@ public void Setup() devTools = driver as IDevTools; if (devTools == null) { - Assert.Ignore("{0} does not support Chrome DevTools Protocol", EnvironmentManager.Instance.Browser); + Assert.Ignore($"{EnvironmentManager.Instance.Browser} does not support Chrome DevTools Protocol"); return; }