3 changed files with 34 additions and 2 deletions
@ -0,0 +1,23 @@ |
|||||
|
using System; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Avalonia.Markup.Xaml.UnitTests.Converters |
||||
|
{ |
||||
|
public class ConverterTests |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void Bug_2228_Relative_Uris_Should_Be_Correctly_Parsed() |
||||
|
{ |
||||
|
var testClass = typeof(TestClassWithUri); |
||||
|
var parsed = AvaloniaXamlLoader.Parse<TestClassWithUri>( |
||||
|
$"<{testClass.Name} xmlns='clr-namespace:{testClass.Namespace}' Uri='/test'/>", testClass.Assembly); |
||||
|
|
||||
|
Assert.False(parsed.Uri.IsAbsoluteUri); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class TestClassWithUri |
||||
|
{ |
||||
|
public Uri Uri { get; set; } |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue