From 41c697d21695b86f1a9ff07cc556add57ff066bb Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Mon, 2 Aug 2021 21:35:22 -0700 Subject: [PATCH 1/4] Rename UnitTestApp.xaml to App.xaml in UnitTests.UWP --- .../{UnitTestApp.xaml => App.xaml} | 0 .../{UnitTestApp.xaml.cs => App.xaml.cs} | 0 UnitTests/UnitTests.UWP/UnitTests.UWP.csproj | 19 +++++++++---------- 3 files changed, 9 insertions(+), 10 deletions(-) rename UnitTests/UnitTests.UWP/{UnitTestApp.xaml => App.xaml} (100%) rename UnitTests/UnitTests.UWP/{UnitTestApp.xaml.cs => App.xaml.cs} (100%) diff --git a/UnitTests/UnitTests.UWP/UnitTestApp.xaml b/UnitTests/UnitTests.UWP/App.xaml similarity index 100% rename from UnitTests/UnitTests.UWP/UnitTestApp.xaml rename to UnitTests/UnitTests.UWP/App.xaml diff --git a/UnitTests/UnitTests.UWP/UnitTestApp.xaml.cs b/UnitTests/UnitTests.UWP/App.xaml.cs similarity index 100% rename from UnitTests/UnitTests.UWP/UnitTestApp.xaml.cs rename to UnitTests/UnitTests.UWP/App.xaml.cs diff --git a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj index 895d2b161b5..3d14728f0ee 100644 --- a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj +++ b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj @@ -149,6 +149,9 @@ + + App.xaml + @@ -243,17 +246,8 @@ - - UnitTestApp.xaml - - - - MSBuild:Compile - Designer - - Designer @@ -343,7 +337,12 @@ - + + + MSBuild:Compile + Designer + + 14.0 From ffb53c254a775d791513cc3b34d38af0a8a938d3 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Mon, 2 Aug 2021 21:40:46 -0700 Subject: [PATCH 2/4] Add WinUI 2.6 to UnitTests.UWP --- UnitTests/UnitTests.UWP/App.xaml | 89 +++++++++++--------- UnitTests/UnitTests.UWP/UnitTests.UWP.csproj | 3 + 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/UnitTests/UnitTests.UWP/App.xaml b/UnitTests/UnitTests.UWP/App.xaml index 87f176b9a0f..2ba86d0d78a 100644 --- a/UnitTests/UnitTests.UWP/App.xaml +++ b/UnitTests/UnitTests.UWP/App.xaml @@ -5,50 +5,55 @@ xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" xmlns:helpers="using:UnitTests.Extensions.Helpers" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:ui="using:Microsoft.Toolkit.Uwp.UI" xmlns:unitTestExtensions="using:UnitTests.Extensions" RequestedTheme="Light"> - - - - - Cat - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + Cat + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj index 3d14728f0ee..f0f6abedfc0 100644 --- a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj +++ b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj @@ -128,6 +128,9 @@ 6.2.12 + + 2.6.1 + 2.1.2 From bd0891290eb7e652c656b55c4d8e2e928b8de3c0 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Tue, 3 Aug 2021 00:53:26 -0700 Subject: [PATCH 3/4] Update Unit Test SDK packages --- UITests/UITests.Tests.MSTest/UITests.Tests.MSTest.csproj | 2 +- .../UnitTests.HighPerformance.NetCore.csproj | 2 +- .../UnitTests.HighPerformance.UWP.csproj | 1 + UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj | 4 ++-- .../UnitTests.Notifications.NetCore.csproj | 2 +- .../UnitTests.Notifications.UWP.csproj | 1 + .../UnitTests.SourceGenerators.csproj | 2 +- UnitTests/UnitTests.UWP/UnitTests.UWP.csproj | 3 ++- .../UnitTests.XamlIslands.UWPApp.csproj | 2 +- 9 files changed, 11 insertions(+), 8 deletions(-) diff --git a/UITests/UITests.Tests.MSTest/UITests.Tests.MSTest.csproj b/UITests/UITests.Tests.MSTest/UITests.Tests.MSTest.csproj index 291ee5c76ad..b060dd32c9f 100644 --- a/UITests/UITests.Tests.MSTest/UITests.Tests.MSTest.csproj +++ b/UITests/UITests.Tests.MSTest/UITests.Tests.MSTest.csproj @@ -15,7 +15,7 @@ - + diff --git a/UnitTests/UnitTests.HighPerformance.NetCore/UnitTests.HighPerformance.NetCore.csproj b/UnitTests/UnitTests.HighPerformance.NetCore/UnitTests.HighPerformance.NetCore.csproj index 2e002b16083..81af94a489d 100644 --- a/UnitTests/UnitTests.HighPerformance.NetCore/UnitTests.HighPerformance.NetCore.csproj +++ b/UnitTests/UnitTests.HighPerformance.NetCore/UnitTests.HighPerformance.NetCore.csproj @@ -12,7 +12,7 @@ - + diff --git a/UnitTests/UnitTests.HighPerformance.UWP/UnitTests.HighPerformance.UWP.csproj b/UnitTests/UnitTests.HighPerformance.UWP/UnitTests.HighPerformance.UWP.csproj index fcf28c49033..51c0f95d1a1 100644 --- a/UnitTests/UnitTests.HighPerformance.UWP/UnitTests.HighPerformance.UWP.csproj +++ b/UnitTests/UnitTests.HighPerformance.UWP/UnitTests.HighPerformance.UWP.csproj @@ -148,6 +148,7 @@ 2.1.2 + 5.0.0 diff --git a/UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj b/UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj index 3f7353455ff..c5bcf7a5da4 100644 --- a/UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj +++ b/UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/UnitTests/UnitTests.Notifications.NetCore/UnitTests.Notifications.NetCore.csproj b/UnitTests/UnitTests.Notifications.NetCore/UnitTests.Notifications.NetCore.csproj index 18a400e4adb..0af83573b18 100644 --- a/UnitTests/UnitTests.Notifications.NetCore/UnitTests.Notifications.NetCore.csproj +++ b/UnitTests/UnitTests.Notifications.NetCore/UnitTests.Notifications.NetCore.csproj @@ -11,7 +11,7 @@ - + diff --git a/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj b/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj index a97ae435d52..35fa9601fd3 100644 --- a/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj +++ b/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj @@ -122,6 +122,7 @@ 2.1.2 + 4.5.0 diff --git a/UnitTests/UnitTests.SourceGenerators/UnitTests.SourceGenerators.csproj b/UnitTests/UnitTests.SourceGenerators/UnitTests.SourceGenerators.csproj index 6b580aa0997..6fe4ab2d352 100644 --- a/UnitTests/UnitTests.SourceGenerators/UnitTests.SourceGenerators.csproj +++ b/UnitTests/UnitTests.SourceGenerators/UnitTests.SourceGenerators.csproj @@ -8,7 +8,7 @@ - + diff --git a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj index f0f6abedfc0..1659951ec88 100644 --- a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj +++ b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj @@ -120,7 +120,7 @@ - 3.1.5 + 5.0.2 5.10.3 @@ -137,6 +137,7 @@ 2.1.2 + 10.0.3 diff --git a/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj b/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj index 55651aaeaab..c8bee2bdaed 100644 --- a/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj +++ b/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj @@ -163,7 +163,7 @@ 6.1.2 From db7179648121223228c4480d571be2e7e307f768 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Tue, 3 Aug 2021 16:23:21 -0700 Subject: [PATCH 4/4] Add check for DefaultRichEditBoxStyle Resource in UnitTests.UWP --- UnitTests/UnitTests.UWP/App.xaml.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/UnitTests/UnitTests.UWP/App.xaml.cs b/UnitTests/UnitTests.UWP/App.xaml.cs index 992b1531ea9..f070ba9d2fe 100644 --- a/UnitTests/UnitTests.UWP/App.xaml.cs +++ b/UnitTests/UnitTests.UWP/App.xaml.cs @@ -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; @@ -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; }