Skip to content

Commit

Permalink
bugfix: updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikaLos committed Dec 18, 2024
1 parent 0c9538b commit 4581268
Showing 1 changed file with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,26 +293,40 @@ public void UpdateExtremaTest() {
}

[Fact]
public void GetSteelUtilisationIdForMinAndMaxExtrema() {
public void ShouldFindTheLargestAndSmallest() {
var dictionary = new Dictionary<int, IList<SteelUtilisation>>() {
{
2, new List<SteelUtilisation>() {
new SteelUtilisation(19),
3, new List<SteelUtilisation>() {
new SteelUtilisation(0),
}
}, {
5, new List<SteelUtilisation>() {
new SteelUtilisation(10),
new SteelUtilisation(3),
2, new List<SteelUtilisation>() {
new SteelUtilisation(1),
}
}, {
},
};
(SteelUtilisationExtremaKeys max, SteelUtilisationExtremaKeys min) = dictionary.GetSteelUtilisationExtremaKeys();
Assert.Equal(2, max.Overall.Id);
Assert.Equal(3, min.Overall.Id);
}

[Fact]
public void ShouldLookAtAllItemsOnTheList() {
var dictionary = new Dictionary<int, IList<SteelUtilisation>>() {
{
3, new List<SteelUtilisation>() {
new SteelUtilisation(1),
}
}, {
2, new List<SteelUtilisation>() {
new SteelUtilisation(0),
new SteelUtilisation(2),
}
},
};
(SteelUtilisationExtremaKeys max, SteelUtilisationExtremaKeys min) = dictionary.GetSteelUtilisationExtremaKeys();
Assert.Equal(2, max.Overall.Id);
Assert.Equal(3, min.Overall.Id);
Assert.Equal(2, min.Overall.Id);
}
}
}

0 comments on commit 4581268

Please sign in to comment.