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.
 
 
 

23 lines
549 B

using System;
using System.Xml;
namespace Avalonia.Markup.Xaml.UnitTests.Xaml
{
public class XamlTestHelpers
{
public static void AssertThrowsXamlException(Action cb)
{
try
{
cb();
}
catch (Exception e)
{
if(e is XmlException)
return;
throw new Exception("Expected to throw xaml exception", e);
}
throw new Exception("Expected to throw xaml exception");
}
}
}