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.
 
 
 

33 lines
1.2 KiB

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Xunit.Extensions;
namespace Avalonia.DesignerSupport.Tests
{
public class DesignerSupportTests
{
[Theory,
InlineData(@"..\..\..\Avalonia.DesignerSupport.TestApp\bin\$BUILD", @"..\..\..\Avalonia.DesignerSupport.TestApp\MainWindow.xaml"),
InlineData(@"..\..\..\..\samples\ControlCatalog.Desktop\bin\$BUILD", @"..\..\..\..\samples\ControlCatalog\MainWindow.xaml")]
public void DesgignerApiShoudBeOperational(string outputDir, string xamlFile)
{
var xaml = File.ReadAllText(xamlFile);
#if DEBUG
outputDir = outputDir.Replace("$BUILD", "Debug");
#else
outputDir = outputDir.Replace("$BUILD", "Release");
#endif
var domain = AppDomain.CreateDomain("TESTDOMAIN" + Guid.NewGuid());
var checker = (Checker)domain.CreateInstanceFromAndUnwrap(typeof (Checker).Assembly.GetModules()[0].FullyQualifiedName,
"Avalonia.DesignerSupport.Tests.Checker");
checker.DoCheck(outputDir, xaml);
}
}
}