public void FindLowerBound() { var values = new[] { 1, 1, 3, 3 }; Assert.That(values.FindLowerBound(4), Is.EqualTo(4)); Assert.That(values.FindLowerBound(3), Is.EqualTo(2)); Assert.That(values.FindLowerBound(2), Is.EqualTo(2)); Assert.That(values.FindLowerBound(1), Is.EqualTo(0)); Assert.That(values.FindLowerBound(0), Is.EqualTo(0)); }