From 24b999cef9c9244f9f411194436798e58b77746b Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 30 Oct 2024 17:22:45 -0500 Subject: [PATCH] Prevent tests from running under wasdk, workaround for missing MultiTarget/csproj support in https://github.com/CommunityToolkit/Tooling-Windows-Submodule/issues/101 --- components/Notifications/tests/TestAssertHelper.cs | 3 +++ components/Notifications/tests/TestMail.cs | 3 +++ components/Notifications/tests/TestTileContentBuilder.cs | 3 +++ components/Notifications/tests/TestToastArguments.cs | 3 +++ components/Notifications/tests/TestToastContentBuilder.cs | 3 +++ components/Notifications/tests/TestWeather.cs | 3 +++ components/Notifications/tests/Test_Adaptive_Xml.cs | 3 +++ components/Notifications/tests/Test_Badge_Xml.cs | 3 +++ components/Notifications/tests/Test_Tile_Xml.cs | 3 +++ components/Notifications/tests/Test_Toast_Xml.cs | 3 +++ components/Notifications/tests/TextXboxModern.cs | 3 +++ 11 files changed, 33 insertions(+) diff --git a/components/Notifications/tests/TestAssertHelper.cs b/components/Notifications/tests/TestAssertHelper.cs index 7977768c..04fd4448 100644 --- a/components/Notifications/tests/TestAssertHelper.cs +++ b/components/Notifications/tests/TestAssertHelper.cs @@ -10,6 +10,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -449,3 +451,4 @@ private static void ParseXml(XmlReader reader, MyXmlElement intoElement) } } } +#endif diff --git a/components/Notifications/tests/TestMail.cs b/components/Notifications/tests/TestMail.cs index 5a56fb75..e1249285 100644 --- a/components/Notifications/tests/TestMail.cs +++ b/components/Notifications/tests/TestMail.cs @@ -5,6 +5,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -166,3 +168,4 @@ private static AdaptiveGroup GenerateMessage(string from, string subject, string } } } +#endif diff --git a/components/Notifications/tests/TestTileContentBuilder.cs b/components/Notifications/tests/TestTileContentBuilder.cs index 179b626c..eaf12b8f 100644 --- a/components/Notifications/tests/TestTileContentBuilder.cs +++ b/components/Notifications/tests/TestTileContentBuilder.cs @@ -6,6 +6,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -110,3 +112,4 @@ private static AdaptiveText GetTileAdaptiveText(TileContentBuilder builder, Tile } } } +#endif diff --git a/components/Notifications/tests/TestToastArguments.cs b/components/Notifications/tests/TestToastArguments.cs index 4a52aa01..e0313d92 100644 --- a/components/Notifications/tests/TestToastArguments.cs +++ b/components/Notifications/tests/TestToastArguments.cs @@ -8,6 +8,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -497,3 +499,4 @@ private static bool IsSame(ToastArguments expected, ToastArguments actual) } } } +#endif diff --git a/components/Notifications/tests/TestToastContentBuilder.cs b/components/Notifications/tests/TestToastContentBuilder.cs index b786c65e..74cc757d 100644 --- a/components/Notifications/tests/TestToastContentBuilder.cs +++ b/components/Notifications/tests/TestToastContentBuilder.cs @@ -7,6 +7,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -1196,3 +1198,4 @@ public void AddComboBoxTest_WithMultipleChoiceAndDefaultSelectedAndTitle_ReturnS } } } +#endif diff --git a/components/Notifications/tests/TestWeather.cs b/components/Notifications/tests/TestWeather.cs index 2ae75f69..e56a3161 100644 --- a/components/Notifications/tests/TestWeather.cs +++ b/components/Notifications/tests/TestWeather.cs @@ -5,6 +5,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -290,3 +292,4 @@ private static AdaptiveSubgroup GenerateLargeSubgroup(string day, string image, } } } +#endif diff --git a/components/Notifications/tests/Test_Adaptive_Xml.cs b/components/Notifications/tests/Test_Adaptive_Xml.cs index ff0447af..eced2e72 100644 --- a/components/Notifications/tests/Test_Adaptive_Xml.cs +++ b/components/Notifications/tests/Test_Adaptive_Xml.cs @@ -6,6 +6,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -595,3 +597,4 @@ private static void AssertAdaptiveChildInTile(string expectedAdaptiveChildXml, I } } } +#endif diff --git a/components/Notifications/tests/Test_Badge_Xml.cs b/components/Notifications/tests/Test_Badge_Xml.cs index 8dcab5e5..6149ff6a 100644 --- a/components/Notifications/tests/Test_Badge_Xml.cs +++ b/components/Notifications/tests/Test_Badge_Xml.cs @@ -5,6 +5,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -72,3 +74,4 @@ private static void AssertPayload(string expectedXml, INotificationContent notif } } } +#endif diff --git a/components/Notifications/tests/Test_Tile_Xml.cs b/components/Notifications/tests/Test_Tile_Xml.cs index 745248c1..d556fb5b 100644 --- a/components/Notifications/tests/Test_Tile_Xml.cs +++ b/components/Notifications/tests/Test_Tile_Xml.cs @@ -6,6 +6,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -1674,3 +1676,4 @@ private static void AssertPayload(string expectedXml, TileContent tile) } } } +#endif diff --git a/components/Notifications/tests/Test_Toast_Xml.cs b/components/Notifications/tests/Test_Toast_Xml.cs index 32877130..5a7c4fa5 100644 --- a/components/Notifications/tests/Test_Toast_Xml.cs +++ b/components/Notifications/tests/Test_Toast_Xml.cs @@ -6,6 +6,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -2190,3 +2192,4 @@ private static void AssertPayload(string expectedXml, ToastContent toast) } } } +#endif diff --git a/components/Notifications/tests/TextXboxModern.cs b/components/Notifications/tests/TextXboxModern.cs index e98a1220..eb5eebef 100644 --- a/components/Notifications/tests/TextXboxModern.cs +++ b/components/Notifications/tests/TextXboxModern.cs @@ -5,6 +5,8 @@ using CommunityToolkit.Notifications; using Microsoft.VisualStudio.TestTools.UnitTesting; +#if WINDOWS_UWP + #nullable disable namespace NotificationsExperiment.Tests { @@ -161,3 +163,4 @@ public void TestXboxModernTile() } } } +#endif