Skip to content

Commit b8a43c5

Browse files
committed
Merge branch 'marquee' of https://github.com/Avid29/Labs-Windows into marquee
2 parents c8292f6 + 43abf1c commit b8a43c5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

components/MarqueeText/tests/ExampleMarqueeTextTestClass.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
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-
using CommunityToolkit.Labs.Core.SourceGenerators.LabsUITestMethod;
6-
using CommunityToolkit.Labs.Tests;
75
using CommunityToolkit.Labs.WinUI.MarqueeTextRns;
6+
using CommunityToolkit.Tests;
7+
using CommunityToolkit.Tooling.TestGen;
88

99
namespace MarqueeTextExperiment.Tests;
1010

@@ -42,18 +42,18 @@ public void SimpleExceptionCheckTest()
4242
Assert.ThrowsException<NotImplementedException>(() => throw new NotImplementedException());
4343
}
4444

45-
// The LabsUITestMethod automatically dispatches to the UI for us to work with UI objects.
46-
[LabsUITestMethod]
45+
// The UIThreadTestMethod automatically dispatches to the UI for us to work with UI objects.
46+
[UIThreadTestMethod]
4747
public void SimpleUIAttributeExampleTest()
4848
{
4949
var component = new MarqueeText();
5050
Assert.IsNotNull(component);
5151
}
5252

53-
// The LabsUITestMethod can also easily grab a XAML Page for us by passing its type as a parameter.
53+
// The UIThreadTestMethod can also easily grab a XAML Page for us by passing its type as a parameter.
5454
// This lets us actually test a control as it would behave within an actual application.
5555
// The page will already be loaded by the time your test is called.
56-
[LabsUITestMethod]
56+
[UIThreadTestMethod]
5757
public void SimpleUIExamplePageTest(ExampleMarqueeTextTestPage page)
5858
{
5959
// You can use the Toolkit Visual Tree helpers here to find the component by type or name:
@@ -66,8 +66,8 @@ public void SimpleUIExamplePageTest(ExampleMarqueeTextTestPage page)
6666
Assert.IsNotNull(componentByName);
6767
}
6868

69-
// You can still do async work with a LabsUITestMethod as well.
70-
[LabsUITestMethod]
69+
// You can still do async work with a UIThreadTestMethod as well.
70+
[UIThreadTestMethod]
7171
public async Task SimpleAsyncUIExamplePageTest(ExampleMarqueeTextTestPage page)
7272
{
7373
// This helper can be used to wait for a rendering pass to complete.
@@ -81,7 +81,7 @@ public async Task SimpleAsyncUIExamplePageTest(ExampleMarqueeTextTestPage page)
8181
//// ----------------------------- ADVANCED TEST SCENARIOS -----------------------------
8282

8383
// If you need to use DataRow, you can use this pattern with the UI dispatch still.
84-
// Otherwise, checkout the LabsUITestMethod attribute above.
84+
// Otherwise, checkout the UIThreadTestMethod attribute above.
8585
// See https://github.com/CommunityToolkit/Labs-Windows/issues/186
8686
[TestMethod]
8787
public async Task ComplexAsyncUIExampleTest()
@@ -93,7 +93,7 @@ await EnqueueAsync(() =>
9393
});
9494
}
9595

96-
// If you want to load other content not within a XAML page using the LabsUITestMethod above.
96+
// If you want to load other content not within a XAML page using the UIThreadTestMethod above.
9797
// Then you can do that using the Load/UnloadTestContentAsync methods.
9898
[TestMethod]
9999
public async Task ComplexAsyncLoadUIExampleTest()
@@ -114,8 +114,8 @@ await EnqueueAsync(async () =>
114114
});
115115
}
116116

117-
// You can still use the LabsUITestMethod to remove the extra layer for the dispatcher as well:
118-
[LabsUITestMethod]
117+
// You can still use the UIThreadTestMethod to remove the extra layer for the dispatcher as well:
118+
[UIThreadTestMethod]
119119
public async Task ComplexAsyncLoadUIExampleWithoutDispatcherTest()
120120
{
121121
var component = new MarqueeText();

0 commit comments

Comments
 (0)