Skip to content

Commit 24b999c

Browse files
committed
Prevent tests from running under wasdk, workaround for missing MultiTarget/csproj support in CommunityToolkit/Tooling-Windows-Submodule#101
1 parent 5a1c279 commit 24b999c

11 files changed

+33
-0
lines changed

components/Notifications/tests/TestAssertHelper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
using CommunityToolkit.Notifications;
1111
using Microsoft.VisualStudio.TestTools.UnitTesting;
1212

13+
#if WINDOWS_UWP
14+
1315
#nullable disable
1416
namespace NotificationsExperiment.Tests
1517
{
@@ -449,3 +451,4 @@ private static void ParseXml(XmlReader reader, MyXmlElement intoElement)
449451
}
450452
}
451453
}
454+
#endif

components/Notifications/tests/TestMail.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
using CommunityToolkit.Notifications;
66
using Microsoft.VisualStudio.TestTools.UnitTesting;
77

8+
#if WINDOWS_UWP
9+
810
#nullable disable
911
namespace NotificationsExperiment.Tests
1012
{
@@ -166,3 +168,4 @@ private static AdaptiveGroup GenerateMessage(string from, string subject, string
166168
}
167169
}
168170
}
171+
#endif

components/Notifications/tests/TestTileContentBuilder.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
using CommunityToolkit.Notifications;
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
88

9+
#if WINDOWS_UWP
10+
911
#nullable disable
1012
namespace NotificationsExperiment.Tests
1113
{
@@ -110,3 +112,4 @@ private static AdaptiveText GetTileAdaptiveText(TileContentBuilder builder, Tile
110112
}
111113
}
112114
}
115+
#endif

components/Notifications/tests/TestToastArguments.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
using CommunityToolkit.Notifications;
99
using Microsoft.VisualStudio.TestTools.UnitTesting;
1010

11+
#if WINDOWS_UWP
12+
1113
#nullable disable
1214
namespace NotificationsExperiment.Tests
1315
{
@@ -497,3 +499,4 @@ private static bool IsSame(ToastArguments expected, ToastArguments actual)
497499
}
498500
}
499501
}
502+
#endif

components/Notifications/tests/TestToastContentBuilder.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
using CommunityToolkit.Notifications;
88
using Microsoft.VisualStudio.TestTools.UnitTesting;
99

10+
#if WINDOWS_UWP
11+
1012
#nullable disable
1113
namespace NotificationsExperiment.Tests
1214
{
@@ -1196,3 +1198,4 @@ public void AddComboBoxTest_WithMultipleChoiceAndDefaultSelectedAndTitle_ReturnS
11961198
}
11971199
}
11981200
}
1201+
#endif

components/Notifications/tests/TestWeather.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
using CommunityToolkit.Notifications;
66
using Microsoft.VisualStudio.TestTools.UnitTesting;
77

8+
#if WINDOWS_UWP
9+
810
#nullable disable
911
namespace NotificationsExperiment.Tests
1012
{
@@ -290,3 +292,4 @@ private static AdaptiveSubgroup GenerateLargeSubgroup(string day, string image,
290292
}
291293
}
292294
}
295+
#endif

components/Notifications/tests/Test_Adaptive_Xml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
using CommunityToolkit.Notifications;
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
88

9+
#if WINDOWS_UWP
10+
911
#nullable disable
1012
namespace NotificationsExperiment.Tests
1113
{
@@ -595,3 +597,4 @@ private static void AssertAdaptiveChildInTile(string expectedAdaptiveChildXml, I
595597
}
596598
}
597599
}
600+
#endif

components/Notifications/tests/Test_Badge_Xml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
using CommunityToolkit.Notifications;
66
using Microsoft.VisualStudio.TestTools.UnitTesting;
77

8+
#if WINDOWS_UWP
9+
810
#nullable disable
911
namespace NotificationsExperiment.Tests
1012
{
@@ -72,3 +74,4 @@ private static void AssertPayload(string expectedXml, INotificationContent notif
7274
}
7375
}
7476
}
77+
#endif

components/Notifications/tests/Test_Tile_Xml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
using CommunityToolkit.Notifications;
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
88

9+
#if WINDOWS_UWP
10+
911
#nullable disable
1012
namespace NotificationsExperiment.Tests
1113
{
@@ -1674,3 +1676,4 @@ private static void AssertPayload(string expectedXml, TileContent tile)
16741676
}
16751677
}
16761678
}
1679+
#endif

components/Notifications/tests/Test_Toast_Xml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
using CommunityToolkit.Notifications;
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
88

9+
#if WINDOWS_UWP
10+
911
#nullable disable
1012
namespace NotificationsExperiment.Tests
1113
{
@@ -2190,3 +2192,4 @@ private static void AssertPayload(string expectedXml, ToastContent toast)
21902192
}
21912193
}
21922194
}
2195+
#endif

0 commit comments

Comments
 (0)