-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added additional test for testing changes to properties in components
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/bunit.testassets/SampleComponents/AsyncRenderChangesProperty.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<button id="tick" @onclick="Tick">Tick</button> | ||
<button id="tock" @onclick="Tock">Tock</button> | ||
@code { | ||
private TaskCompletionSource<object?> _tcs = new TaskCompletionSource<object?>(); | ||
public int Counter; | ||
|
||
private Task Tick() | ||
{ | ||
Counter++; | ||
return _tcs.Task.ContinueWith(t => { Counter++; }); | ||
} | ||
|
||
private void Tock() | ||
{ | ||
_tcs.TrySetResult(null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters