GetSector() public method

Gets the sector time collection for the specified one-based sector number.
/// Thrown when is not positive or is greater than three. ///
public GetSector ( int sectorNumber ) : PostedTimeCollectionModel
sectorNumber int The one-based sector number.
return AK.F1.Timing.Model.Collections.PostedTimeCollectionModel
Ejemplo n.º 1
0
        public void get_sector_throws_if_sector_number_is_not_positive_or_greater_than_three()
        {
            var model = new LapTimesModel();

            Assert.Throws<ArgumentOutOfRangeException>(() => model.GetSector(0));
            Assert.Throws<ArgumentOutOfRangeException>(() => model.GetSector(4));
        }
Ejemplo n.º 2
0
        public void can_get_the_times_for_a_sector()
        {
            var model = new LapTimesModel();

            Assert.Same(model.S1, model.GetSector(1));
            Assert.Same(model.S2, model.GetSector(2));
            Assert.Same(model.S3, model.GetSector(3));
        }