Skip to content

Commit

Permalink
Added test.
Browse files Browse the repository at this point in the history
  • Loading branch information
azchohfi committed Nov 11, 2024
1 parent 220fae9 commit 40e24a5
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,27 @@ public async Task ComplexAsyncLoadUIExampleWithoutDispatcherTest()

Assert.IsFalse(component.IsLoaded);
}

// You can still use the UIThreadTestMethod to remove the extra layer for the dispatcher as well:
[TestMethod]
public async Task ComplexAsyncLoadUIExampleWithCustomConfigTest()
{
await EnqueueAsync(async () =>
{
var component = new MarkdownTextBlock
{
Config = new MarkdownConfig()
};
Assert.IsNotNull(component);
Assert.IsFalse(component.IsLoaded);
await LoadTestContentAsync(component);
Assert.IsTrue(component.IsLoaded);
await UnloadTestContentAsync(component);
Assert.IsFalse(component.IsLoaded);
});
}
}

0 comments on commit 40e24a5

Please sign in to comment.