From f93eade2889f3ac6cc6e1827b60282c5010673af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 2 Dec 2022 15:19:53 +0100 Subject: [PATCH] Fixup some nullability mismatch (#1427) --- .../PublicAPI/PublicAPI.Shipped.txt | 2 +- .../Services/TestContextImplementation.cs | 2 +- .../PublicAPI/PublicAPI.Shipped.txt | 6 +++--- src/TestFramework/TestFramework.Extensions/TestContext.cs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/PublicAPI.Shipped.txt b/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/PublicAPI.Shipped.txt index d1c1f3965e..d2b9efff0d 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/PublicAPI.Shipped.txt +++ b/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/PublicAPI.Shipped.txt @@ -127,7 +127,7 @@ Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListener Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListenerWrapper Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListenerWrapper.GetWriter() -> System.IO.TextWriter? Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListenerWrapper.TraceListenerWrapper(System.IO.TextWriter! textWriter) -> void -override Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation.AddResultFile(string? fileName) -> void +override Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation.AddResultFile(string! fileName) -> void override Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation.CurrentTestOutcome.get -> Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestOutcome override Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation.Properties.get -> System.Collections.IDictionary! override Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation.Write(string! format, params object?[]! args) -> void diff --git a/src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.cs b/src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.cs index a97204c313..e15e16855f 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.cs +++ b/src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.cs @@ -169,7 +169,7 @@ public override UTF.UnitTestOutcome CurrentTestOutcome public UTF.TestContext Context => this; /// - public override void AddResultFile(string? fileName) + public override void AddResultFile(string fileName) { #if !WINDOWS_UWP && !WIN_UI if (StringEx.IsNullOrEmpty(fileName)) diff --git a/src/TestFramework/TestFramework.Extensions/PublicAPI/PublicAPI.Shipped.txt b/src/TestFramework/TestFramework.Extensions/PublicAPI/PublicAPI.Shipped.txt index 59ce0a4437..171e5fe5e8 100644 --- a/src/TestFramework/TestFramework.Extensions/PublicAPI/PublicAPI.Shipped.txt +++ b/src/TestFramework/TestFramework.Extensions/PublicAPI/PublicAPI.Shipped.txt @@ -1,10 +1,10 @@ #nullable enable -abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.AddResultFile(string? fileName) -> void +abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.AddResultFile(string! fileName) -> void abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Properties.get -> System.Collections.IDictionary! abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Write(string! format, params object?[]! args) -> void -abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Write(string! message) -> void +abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Write(string? message) -> void abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.WriteLine(string! format, params object?[]! args) -> void -abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.WriteLine(string! message) -> void +abstract Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.WriteLine(string? message) -> void Microsoft.VisualStudio.TestTools.UnitTesting.TestContext Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.TestContext() -> void virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.CancellationTokenSource.get -> System.Threading.CancellationTokenSource! diff --git a/src/TestFramework/TestFramework.Extensions/TestContext.cs b/src/TestFramework/TestFramework.Extensions/TestContext.cs index fc69b6c25a..85ad4f4746 100644 --- a/src/TestFramework/TestFramework.Extensions/TestContext.cs +++ b/src/TestFramework/TestFramework.Extensions/TestContext.cs @@ -158,7 +158,7 @@ public abstract class TestContext /// /// The file Name. /// - public abstract void AddResultFile(string? fileName); + public abstract void AddResultFile(string fileName); #if NETFRAMEWORK /// @@ -180,7 +180,7 @@ public abstract class TestContext /// Used to write trace messages while the test is running. /// /// formatted message string. - public abstract void Write(string message); + public abstract void Write(string? message); /// /// Used to write trace messages while the test is running. @@ -193,7 +193,7 @@ public abstract class TestContext /// Used to write trace messages while the test is running. /// /// formatted message string. - public abstract void WriteLine(string message); + public abstract void WriteLine(string? message); /// /// Used to write trace messages while the test is running.