Browse Source

Added failing test for #2584.

pull/2740/head
Steven Kirk 7 years ago
parent
commit
eeb7271c34
  1. 24
      tests/Avalonia.Styling.UnitTests/StylesTests.cs

24
tests/Avalonia.Styling.UnitTests/StylesTests.cs

@ -2,6 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Controls;
using Xunit;
namespace Avalonia.Styling.UnitTests
@ -111,5 +112,28 @@ namespace Avalonia.Styling.UnitTests
Assert.False(raised);
}
[Fact]
public void Finds_Resource_In_Merged_Dictionary()
{
var target = new Styles
{
Resources = new ResourceDictionary
{
MergedDictionaries =
{
new ResourceDictionary
{
{ "foo", "bar" },
}
}
}
};
var result = target.FindResource("foo");
Assert.Equal("bar", result);
}
}
}

Loading…
Cancel
Save