public void SortByPopularity_WhenPopular_ShouldBeOrderd() { // Arrange _sut = new SortService(); var unsorted = Unsorted(); var histories = ShopperHistories(); var current = unsorted.Max(p => p.Name); // Act var sorted = _sut.SortByPopularity(unsorted, histories).ToList(); // Assert Assert.True(sorted[0].Name == "Product A"); Assert.True(sorted[1].Name == "Product B"); }