Beispiel #1
0
        public void Test_Nth_interval()
        {
            var intervals = new Intervals("1 3 5");

            intervals.GetNthInterval(0).Should().Be("1");
            intervals.GetNthInterval(1).Should().Be("3");
            intervals.GetNthInterval(2).Should().Be("5");
        }
Beispiel #2
0
        public void Nth_interval_for_index_outside_of_range_should_throw()
        {
            var    intervals = new Intervals("1 3 5");
            Action act       = () => intervals.GetNthInterval(3);

            act.ShouldThrow <IndexOutOfRangeException>();
        }