public void WithMaxGetsItemWithMaxCount() { var items = new[] { "hello", "goodbye", "whatever", "bogus" }; Assert.That(items.WithMax(x => x.Length), Is.EqualTo("whatever")); }
public void WithMaxGetsFirstItemWithMaxCountIfMultipleWithSame() { var items = new[] { "hello", "goodbye", "whatever", "88888888" }; Assert.That(items.WithMax(x => x.Length), Is.EqualTo("whatever")); }