mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-11 08:22:53 +00:00
Fixed test concurrency issue
This commit is contained in:
@@ -195,6 +195,7 @@ namespace CryptoExchange.Net.UnitTests
|
||||
LibraryHelpers.StaticLogger = new TraceLogger();
|
||||
var listener = new EnumValueTraceListener();
|
||||
Trace.Listeners.Add(listener);
|
||||
EnumConverter<TestEnum>.Reset();
|
||||
try
|
||||
{
|
||||
Assert.Throws<Exception>(() =>
|
||||
|
||||
@@ -309,6 +309,12 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
|
||||
#endif
|
||||
}
|
||||
|
||||
internal static void Reset()
|
||||
{
|
||||
_undefinedEnumValue = null;
|
||||
_unknownValuesWarned = new ConcurrentBag<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the string value for an enum value using the MapAttribute mapping. When multiple values are mapped for a enum entry the first value will be returned
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user