Skip to content

Commit c5cc067

Browse files
committed
test: Fix tests when StfReader tests run before JsonReader tests
1 parent 1455952 commit c5cc067

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Source/Tests/AssertWarnings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
namespace Tests
2727
{
28+
// TODO: This class needs to be removed and replaced with a `JsonReaderTests`-style warning counter, instead of modifying global state (`Trace.Listeners`)
2829
/// <summary>
2930
/// This class can be used to test for Trace.TraceWarning() calls.
3031
/// Instead of having the warnings go to the output window of xunit, they are captured by this class.

Source/Tests/Orts.Parsers.OR/JsonReaderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424

2525
namespace Tests.Orts.Parsers.OR
2626
{
27+
// TODO: This class is a temporary fix until `AssertWarnings` is removed
2728
public class JsonReaderTestsSetup
2829
{
2930
public JsonReaderTestsSetup()
3031
{
32+
Trace.Listeners.Clear();
3133
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
3234
Trace.AutoFlush = true;
3335
}

0 commit comments

Comments
 (0)