Skip to content

Commit 49ec3c2

Browse files
committed
Renamed test case _TestInProgressNotificationAfterStart_ to _TestIsLoadingNotificationAfterStart_ and adpated this test case for new vm.
1 parent 236b2ee commit 49ec3c2

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/Codebreaker.ViewModels.Tests/GamePageViewModelTests.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)