Exemplo 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));
        }
Exemplo n.º 2
0
 public static void Empty(this Assertions assert, LapTimesModel model)
 {
     assert.Empty(model.Laps);
     assert.Empty(model.S1);
     assert.Empty(model.S2);
     assert.Empty(model.S3);
     assert.Empty(model.History);
 }
Exemplo n.º 3
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));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initialises a new instance of the <see cref="DriverModel"/> class and specifies the
 /// driver's Id.
 /// </summary>
 /// <param name="id">The driver's Id.</param>
 public DriverModel(int id)
 {
     Id = id;
     LapTimes = new LapTimesModel();
     PitTimes = new PostedTimeCollectionModel();
     QuallyTimes = new QuallyTimesModel();
     Status = DriverStatus.InPits;
     Builder = new DriverModelBuilder(this);
 }
Exemplo n.º 5
0
        public void can_create()
        {
            var model = new LapTimesModel();

            Assert.Empty(model);
        }