Skip to content

Commit dae165d

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 dae165d

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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System;
68
using System.Collections.Generic;
79
using System.IO;
@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using CommunityToolkit.Notifications;
68
using Microsoft.VisualStudio.TestTools.UnitTesting;
79

@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System.Linq;
68
using CommunityToolkit.Notifications;
79
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System;
68
using System.Collections.Generic;
79
using System.Linq;
@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System;
68
using System.Linq;
79
using CommunityToolkit.Notifications;
@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using CommunityToolkit.Notifications;
68
using Microsoft.VisualStudio.TestTools.UnitTesting;
79

@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System;
68
using CommunityToolkit.Notifications;
79
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using CommunityToolkit.Notifications;
68
using Microsoft.VisualStudio.TestTools.UnitTesting;
79

@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System;
68
using CommunityToolkit.Notifications;
79
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -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
@@ -2,6 +2,8 @@
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+
#if WINDOWS_UWP
6+
57
using System;
68
using CommunityToolkit.Notifications;
79
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -2190,3 +2192,4 @@ private static void AssertPayload(string expectedXml, ToastContent toast)
21902192
}
21912193
}
21922194
}
2195+
#endif

0 commit comments

Comments
 (0)