Skip to content

Commit db71796

Browse files
Add check for DefaultRichEditBoxStyle Resource in UnitTests.UWP
1 parent bd08912 commit db71796

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

UnitTests/UnitTests.UWP/App.xaml.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using Microsoft.VisualStudio.TestTools.UnitTesting.Logging;
56
using System;
67
using UnitTests.Extensions;
78
using Windows.ApplicationModel;
@@ -90,6 +91,17 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
9091
// TODO: Load state from previously suspended application
9192
}
9293

94+
Logger.LogMessage("Looking for DefaultRichEditBoxStyle...");
95+
if (!Resources.TryGetValue("DefaultRichEditBoxStyle", out var value))
96+
{
97+
Logger.LogMessage("ERROR: Couldn't find DefaultRichEditBoxStyle in WinUI!");
98+
throw new ApplicationException("Couldn't find DefaultRichEditBoxStyle resource.");
99+
}
100+
else
101+
{
102+
Logger.LogMessage("FOUND!");
103+
}
104+
93105
// Place the frame in the current Window
94106
Window.Current.Content = rootFrame;
95107
}

0 commit comments

Comments
 (0)