Browse Source

Added failing test for #1765.

pull/1978/head
Steven Kirk 8 years ago
parent
commit
e2f09b5324
  1. 18
      tests/Avalonia.Controls.UnitTests/ApplicationTests.cs

18
tests/Avalonia.Controls.UnitTests/ApplicationTests.cs

@ -113,5 +113,21 @@ namespace Avalonia.Controls.UnitTests
Assert.Throws<ArgumentNullException>(() => { Application.Current.Run(null); }); Assert.Throws<ArgumentNullException>(() => { Application.Current.Run(null); });
} }
} }
[Fact]
public void Raises_ResourcesChanged_When_Event_Handler_Added_After_Resources_Has_Been_Accessed()
{
// Test for #1765.
using (UnitTestApplication.Start())
{
var resources = Application.Current.Resources;
var raised = false;
Application.Current.ResourcesChanged += (s, e) => raised = true;
resources["foo"] = "bar";
Assert.True(raised);
}
}
} }
} }

Loading…
Cancel
Save