File tree Expand file tree Collapse file tree
src/Codebreaker.ViewModels.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,23 +36,21 @@ public async Task TestGameStart()
3636 }
3737
3838 [ Fact ]
39- public async Task TestInProgressNotificationAfterStart ( )
39+ public async Task TestIsLoadingNotificationAfterStart ( )
4040 {
4141 var viewModel = new GamePageViewModel ( _gamesClientMock . Object , _infoBarServiceMock . Object ) ;
42- List < bool > expected = new ( ) { true , false } ;
43- viewModel . Name = "Test" ;
44- List < bool > inProgressValues = new ( ) ;
42+ List < bool > expectedIsLoadingValues = [ true , false ] ;
43+ List < bool > actualInProgressValues = [ ] ;
44+ viewModel . Username = "Test" ;
4545
4646 viewModel . PropertyChanged += ( sender , e ) =>
4747 {
48- if ( e . PropertyName is "InProgress" )
49- {
50- inProgressValues . Add ( _viewModel . InProgress ) ;
51- }
48+ if ( e . PropertyName is nameof ( GamePageViewModel . IsLoading ) )
49+ actualInProgressValues . Add ( viewModel . IsLoading ) ;
5250 } ;
5351
5452 await viewModel . StartGameCommand . ExecuteAsync ( null ) ;
5553
56- Assert . Equal ( expected , inProgressValues ) ;
54+ Assert . Equal ( expectedIsLoadingValues , actualInProgressValues ) ;
5755 }
5856}
You can’t perform that action at this time.
0 commit comments