Skip to content

Commit 40e24a5

Browse files
committed
Added test.
1 parent 220fae9 commit 40e24a5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

components/MarkdownTextBlock/tests/ExampleMarkdownTextBlockTestClass.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,27 @@ public async Task ComplexAsyncLoadUIExampleWithoutDispatcherTest()
131131

132132
Assert.IsFalse(component.IsLoaded);
133133
}
134+
135+
// You can still use the UIThreadTestMethod to remove the extra layer for the dispatcher as well:
136+
[TestMethod]
137+
public async Task ComplexAsyncLoadUIExampleWithCustomConfigTest()
138+
{
139+
await EnqueueAsync(async () =>
140+
{
141+
var component = new MarkdownTextBlock
142+
{
143+
Config = new MarkdownConfig()
144+
};
145+
Assert.IsNotNull(component);
146+
Assert.IsFalse(component.IsLoaded);
147+
148+
await LoadTestContentAsync(component);
149+
150+
Assert.IsTrue(component.IsLoaded);
151+
152+
await UnloadTestContentAsync(component);
153+
154+
Assert.IsFalse(component.IsLoaded);
155+
});
156+
}
134157
}

0 commit comments

Comments
 (0)