Skip to content

Commit bb243a6

Browse files
committed
Update SettingsViewModelTests.cs
1 parent fb2be71 commit bb243a6

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

tests/ShinyWonderland.Tests/ViewModels/SettingsViewModelTests.cs

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,18 @@ public void AppVersion_ShouldNotBeEmpty()
1818
viewModel.AppVersion.ShouldNotBeNullOrEmpty();
1919
}
2020

21-
[Fact]
22-
public void Sorts_ShouldContainAllOptions()
23-
{
24-
// Assert
25-
viewModel.Sorts.ShouldContain("Name");
26-
viewModel.Sorts.ShouldContain("Wait Time");
27-
viewModel.Sorts.ShouldContain("Paid Wait Time");
28-
viewModel.Sorts.ShouldContain("Distance");
29-
viewModel.Sorts.Length.ShouldBe(4);
30-
}
31-
3221
[Theory]
33-
[InlineData(0, RideOrder.Name)]
34-
[InlineData(1, RideOrder.WaitTime)]
35-
[InlineData(2, RideOrder.PaidWaitTime)]
36-
[InlineData(3, RideOrder.Distance)]
37-
public void SortByIndex_ShouldUpdateAppSettings(int index, RideOrder expectedOrder)
22+
[InlineData(RideOrder.Name)]
23+
[InlineData(RideOrder.WaitTime)]
24+
[InlineData(RideOrder.PaidWaitTime)]
25+
[InlineData(RideOrder.Distance)]
26+
public void Ordering_ShouldUpdateAppSettings(RideOrder order)
3827
{
3928
// Act
40-
viewModel.SortByIndex = index;
29+
viewModel.Ordering = order;
4130

4231
// Assert
43-
appSettings.Ordering.ShouldBe(expectedOrder);
32+
appSettings.Ordering.ShouldBe(order);
4433
}
4534

4635
[Fact]
@@ -126,13 +115,13 @@ public void InitialValues_ShouldMatchAppSettingsDefaults()
126115
}
127116

128117
[Fact]
129-
public void SortByIndex_InitialValue_ShouldMapFromAppSettings()
118+
public void Ordering_InitialValue_ShouldMatchAppSettings()
130119
{
131120
// Arrange
132121
var settings = new AppSettings { Ordering = RideOrder.WaitTime };
133122
var vm = new SettingsViewModel(settings);
134123

135124
// Assert
136-
vm.SortByIndex.ShouldBe(1);
125+
vm.Ordering.ShouldBe(RideOrder.WaitTime);
137126
}
138127
}

0 commit comments

Comments
 (0)