提交 369c4ffe 编写于 作者: M Martin Zikmund

test: ImageFailed should be raised

上级 bd42976e
......@@ -495,6 +495,23 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Controls
await WindowHelper.WaitForLoaded(image);
}
[TestMethod]
[RunsOnUIThread]
public async Task When_ImageFailed()
{
var image = new Image() { Width = 100, Height = 100 };
TestServices.WindowHelper.WindowContent = image;
await WindowHelper.WaitForLoaded(image);
bool imageFailedRaised = false;
image.ImageFailed += (s, e) =>
{
imageFailedRaised = true;
};
image.Source = new BitmapImage(new Uri("ms-appx:///image/definitely/does/not/exist.png"));
Assert.IsTrue(imageFailedRaised);
}
[TestMethod]
[RunsOnUIThread]
#if __MACOS__
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册