diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/ErrorMessage.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/ErrorMessage.cs deleted file mode 100644 index f4e41aa43e..0000000000 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/ErrorMessage.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.Testing.Platform.OutputDevice.Terminal; - -/// -/// An error message that was sent to output during the build. -/// -internal sealed record ErrorMessage(string Text) : IProgressMessage; diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressMessage.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressMessage.cs deleted file mode 100644 index f8f331ab23..0000000000 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressMessage.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.Testing.Platform.OutputDevice.Terminal; - -/// -/// Error or warning message that was sent to screen during the test run. -/// -internal interface IProgressMessage; diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs index 98193dcde6..ee5447e5fb 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs @@ -791,18 +791,10 @@ public void StartCancelling() } internal void WriteErrorMessage(string text, int? padding) - { - TestProgressState asm = GetOrAddAssemblyRun(); - asm.AddError(text); - WriteMessage(text, TerminalColor.DarkRed, padding); - } + => WriteMessage(text, TerminalColor.DarkRed, padding); internal void WriteWarningMessage(string text, int? padding) - { - TestProgressState asm = GetOrAddAssemblyRun(); - asm.AddWarning(text); - WriteMessage(text, TerminalColor.DarkYellow, padding); - } + => WriteMessage(text, TerminalColor.DarkYellow, padding); internal void WriteErrorMessage(Exception exception) => WriteErrorMessage(exception.ToString(), padding: null); diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressState.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressState.cs index c792c8beee..b962b40848 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressState.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressState.cs @@ -10,7 +10,6 @@ internal sealed class TestProgressState public TestProgressState(long id, string assembly, string? targetFramework, string? architecture, IStopwatch stopwatch, bool isDiscovery) { Id = id; - Assembly = assembly; TargetFramework = targetFramework; Architecture = architecture; Stopwatch = stopwatch; @@ -18,8 +17,6 @@ public TestProgressState(long id, string assembly, string? targetFramework, stri IsDiscovery = isDiscovery; } - public string Assembly { get; } - public string AssemblyName { get; } public string? TargetFramework { get; } @@ -30,8 +27,6 @@ public TestProgressState(long id, string assembly, string? targetFramework, stri public int DiscoveredTests { get; internal set; } - public List Messages { get; } = []; - public int FailedTests { get; internal set; } public int PassedTests { get; internal set; } @@ -51,10 +46,4 @@ public TestProgressState(long id, string assembly, string? targetFramework, stri public List DiscoveredTestDisplayNames { get; internal set; } = []; public bool IsDiscovery { get; } - - internal void AddError(string text) - => Messages.Add(new ErrorMessage(text)); - - internal void AddWarning(string text) - => Messages.Add(new WarningMessage(text)); } diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/WarningMessage.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/WarningMessage.cs deleted file mode 100644 index c938898aa7..0000000000 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/WarningMessage.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.Testing.Platform.OutputDevice.Terminal; - -/// -/// A warning message that was sent during run. -/// -internal sealed record WarningMessage(string Text) : IProgressMessage;