Skip to content

Commit

Permalink
Add check for DefaultRichEditBoxStyle Resource in UnitTests.UWP
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hawker committed Aug 3, 2021
1 parent 4b4725e commit af048ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions UnitTests/UnitTests.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.VisualStudio.TestTools.UnitTesting.Logging;
using System;
using UnitTests.Extensions;
using Windows.ApplicationModel;
Expand Down Expand Up @@ -90,6 +91,17 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// TODO: Load state from previously suspended application
}

Logger.LogMessage("Looking for DefaultRichEditBoxStyle...");
if (!Resources.TryGetValue("DefaultRichEditBoxStyle", out var value))
{
Logger.LogMessage("ERROR: Couldn't find DefaultRichEditBoxStyle in WinUI!");
throw new ApplicationException("Couldn't find DefaultRichEditBoxStyle resource.");
}
else
{
Logger.LogMessage("FOUND!");
}

// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
Expand Down

0 comments on commit af048ae

Please sign in to comment.