Browse Source

Added failing test for #11484.

pull/11849/head
Steven Kirk 3 years ago
parent
commit
9d051a6a64
  1. 13
      tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Coercion.cs

13
tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Coercion.cs

@ -243,6 +243,19 @@ namespace Avalonia.Base.UnitTests
Assert.Equal(new[] { 11 }, target.CoerceFooInvocations); Assert.Equal(new[] { 11 }, target.CoerceFooInvocations);
} }
[Fact]
public void Second_Coerce_Of_Default_Value_Is_Passed_Uncoerced_Value()
{
var target = new Class1();
target.MinFoo = 20;
target.CoerceFooInvocations.Clear();
target.CoerceValue(Class1.FooProperty);
target.CoerceValue(Class1.FooProperty);
Assert.Equal(new[] { 11, 11 }, target.CoerceFooInvocations);
}
[Fact] [Fact]
public void ClearValue_Respects_Coerced_Default_Value() public void ClearValue_Respects_Coerced_Default_Value()
{ {

Loading…
Cancel
Save