Skip to content

Commit 8e2e167

Browse files
committed
fix test
1 parent 592b931 commit 8e2e167

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/tests/AWS.Lambda.Powertools.Common.Tests/ConsoleWrapperTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public void SetOut_OverridesConsoleOutput()
127127
finally
128128
{
129129
// Restore original output
130-
Console.SetOut(originalOutput);
130+
ConsoleWrapper.ResetForTest();
131131
}
132132
}
133133

@@ -137,7 +137,7 @@ public void StaticWriteLine_FormatsLogMessageCorrectly()
137137
// Arrange
138138
var originalOutput = Console.Out;
139139
using var stringWriter = new StringWriter();
140-
Console.SetOut(stringWriter);
140+
ConsoleWrapper.SetOut(stringWriter);
141141

142142
try
143143
{
@@ -153,7 +153,7 @@ public void StaticWriteLine_FormatsLogMessageCorrectly()
153153
finally
154154
{
155155
// Restore original output
156-
Console.SetOut(originalOutput);
156+
ConsoleWrapper.ResetForTest();
157157
}
158158
}
159159

0 commit comments

Comments
 (0)