Skip to content

Commit 6d3b8b9

Browse files
committed
Fixed some leftover unit test build errors
1 parent 64c56d7 commit 6d3b8b9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

UnitTests/UnitTests.UWP/Extensions/Test_LogicalTreeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
294294
await SetTestContentAsync(treeRoot);
295295

296296
// Main Test
297-
var thing = treeRoot.FindChildren<UniformGrid>();
297+
var thing = treeRoot.FindChildren().OfType<UniformGrid>();
298298

299299
Assert.IsNotNull(thing, "Expected to still have enumerable.");
300300

UnitTests/UnitTests.UWP/Extensions/Test_VisualTreeExtensions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
4545
await SetTestContentAsync(treeRoot);
4646

4747
// Main Test
48-
var textBlock = treeRoot.FindDescendantByName("TargetElement");
48+
var textBlock = treeRoot.FindDescendant("TargetElement");
4949

5050
Assert.IsNotNull(textBlock, "Expected to find something.");
5151
Assert.IsInstanceOfType(textBlock, typeof(TextBlock), "Didn't find expected typed element.");
@@ -80,7 +80,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
8080
await SetTestContentAsync(treeRoot);
8181

8282
// Main Test
83-
var textBlock = treeRoot.FindDescendantByName("TargetElement");
83+
var textBlock = treeRoot.FindDescendant("TargetElement");
8484

8585
Assert.IsNull(textBlock, "Didn't expect to find anything.");
8686
});
@@ -220,7 +220,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
220220
await SetTestContentAsync(treeRoot);
221221

222222
// Main Test
223-
var textBlocks = treeRoot.FindDescendants<TextBlock>();
223+
var textBlocks = treeRoot.FindDescendants().OfType<TextBlock>();
224224

225225
Assert.IsNotNull(textBlocks, "Expected to find something.");
226226

@@ -267,7 +267,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
267267
await SetTestContentAsync(treeRoot);
268268

269269
// Main Test
270-
var thing = treeRoot.FindDescendants<UniformGrid>();
270+
var thing = treeRoot.FindDescendants().OfType<UniformGrid>();
271271

272272
Assert.IsNotNull(thing, "Expected to find something.");
273273

@@ -411,7 +411,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
411411
Assert.IsNotNull(startingPoint, "Could not find starting element.");
412412

413413
// Main Test
414-
var grid = startingPoint.FindAscendantByName("TargetElement");
414+
var grid = startingPoint.FindAscendant("TargetElement");
415415

416416
Assert.IsNotNull(grid, "Expected to find Grid");
417417
Assert.AreEqual(targetGrid, grid, "Grid didn't match expected.");
@@ -458,7 +458,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
458458
Assert.IsNotNull(startingPoint, "Could not find starting element.");
459459

460460
// Main Test
461-
var grid = startingPoint.FindAscendantByName("TargetElement");
461+
var grid = startingPoint.FindAscendant("TargetElement");
462462

463463
Assert.IsNull(grid, "Didn't expect to find anything.");
464464
});

0 commit comments

Comments
 (0)