A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
752 B

using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace Avalonia.Base.UnitTests
{
internal static class ModuleInitializer
{
[ModuleInitializer]
internal static void TestInit()
{
Trace.Listeners.Insert(0, new ThrowListener());
}
private class ThrowListener : TextWriterTraceListener
{
public override void Fail(string? message)
{
throw new Exception("Assertion Failed. " + message);
}
public override void Fail(string? message, string? detailMessage)
{
throw new Exception("Assertion Failed. " + message + detailMessage);
}
}
}
}