Browse Source

Add failing test for #8372.

pull/8373/head
Steven Kirk 4 years ago
parent
commit
64518efc51
  1. 15
      tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_SetValue.cs

15
tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_SetValue.cs

@ -17,6 +17,21 @@ namespace Avalonia.Base.UnitTests
Assert.Equal("foodefault", target.GetValue(Class1.FooProperty));
}
[Fact]
public void ClearValue_Resets_Value_To_Style_value()
{
Class1 target = new Class1();
target.SetValue(Class1.FooProperty, "style", BindingPriority.Style);
target.SetValue(Class1.FooProperty, "local");
Assert.Equal("local", target.GetValue(Class1.FooProperty));
target.ClearValue(Class1.FooProperty);
Assert.Equal("style", target.GetValue(Class1.FooProperty));
}
[Fact]
public void ClearValue_Raises_PropertyChanged()
{

Loading…
Cancel
Save