Skip to content

Commit 5a3e37e

Browse files
committed
Fixed notifications tests in release mode
1 parent 84a81da commit 5a3e37e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

UnitTests/UnitTests.Notifications.Shared/AssertHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private class XmlElementHelper
250250

251251
public static void AssertToast(string expected, ToastContent toast)
252252
{
253-
AssertHelper.AssertXml(expected, toast.GetContent());
253+
AssertHelper.AssertXml(expected.ToLower(), toast.GetContent().ToLower());
254254

255255
#if WINDOWS_UWP
256256
// For WinRT, we'll test the XmlDocument method too, make sure it works.
@@ -260,7 +260,7 @@ public static void AssertToast(string expected, ToastContent toast)
260260

261261
public static void AssertTile(string expected, TileContent tile)
262262
{
263-
AssertHelper.AssertXml(expected, tile.GetContent());
263+
AssertHelper.AssertXml(expected.ToLower(), tile.GetContent().ToLower());
264264

265265
#if WINDOWS_UWP
266266
// For WinRT, we'll test the XmlDocument method too, make sure it works.
@@ -296,7 +296,7 @@ private static void AssertXmlElement(MyXmlElement expected, MyXmlElement actual)
296296

297297

298298
// If name doesn't match
299-
Assert.AreEqual(expected.Name, actual.Name, "Element names did not match.");
299+
Assert.AreEqual(expected.Name.ToLower(), actual.Name.ToLower(), "Element names did not match.");
300300

301301

302302
// If attribute count doesn't match
@@ -313,7 +313,7 @@ private static void AssertXmlElement(MyXmlElement expected, MyXmlElement actual)
313313
Assert.Fail("Expected element to have attribute " + expectedAttr.Name + " but it didn't.");
314314

315315
// Make sure value matches
316-
Assert.AreEqual(expectedAttr.Value, actualAttr.Value, $@"Attribute values for ""{expectedAttr.Name}"" didn't match.");
316+
Assert.AreEqual(expectedAttr.Value.ToLower(), actualAttr.Value.ToLower(), $@"Attribute values for ""{expectedAttr.Name}"" didn't match.");
317317
}
318318

319319

UnitTests/UnitTests.Notifications.WinRT/UnitTests.Notifications.WinRT.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</PropertyGroup>
3434
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
3535
<OutputPath>bin\x86\Release\</OutputPath>
36-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
36+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;WINRT</DefineConstants>
3737
<Optimize>true</Optimize>
3838
<NoWarn>;2008</NoWarn>
3939
<DebugType>pdbonly</DebugType>

0 commit comments

Comments
 (0)