Пример #1
0
 public void FindUpperBound()
 {
     var values = new[] { 1, 1, 3, 3 };
     Assert.That(values.FindUpperBound(4), Is.EqualTo(3));
     Assert.That(values.FindUpperBound(3), Is.EqualTo(3));
     Assert.That(values.FindUpperBound(2), Is.EqualTo(1));
     Assert.That(values.FindUpperBound(1), Is.EqualTo(1));
     Assert.That(values.FindUpperBound(0), Is.EqualTo(-1));
 }