SetColumnHasValue() public method

Sets a value indicating if the specified column has a value.
public SetColumnHasValue ( GridColumn column, bool value ) : void
column GridColumn The column to set.
value bool if the specified column has a value, /// otherwise;
return void
Ejemplo n.º 1
0
        public void can_reset_the_driver_state()
        {
            var driver = new LiveDriver(1);

            driver.CarNumber = 21;
            driver.IsExpectingPitTimes = true;
            driver.LapNumber = 4;
            driver.LastGapMessage = new SetDriverGapMessage(1, LapGap.Zero);
            driver.LastIntervalMessage = new SetDriverIntervalMessage(1, LapGap.Zero);
            driver.LastLapTime = new PostedTime(TimeSpan.FromSeconds(90), PostedTimeType.Normal, 3);
            driver.SetLastSector(1, driver.LastLapTime);
            driver.SetLastSector(2, driver.LastLapTime);
            driver.SetLastSector(3, driver.LastLapTime);
            driver.Name = "Name";
            driver.CurrentSectorNumber = 2;
            driver.Position = 5;
            driver.ChangeStatus(DriverStatus.OnTrack);
            driver.SetColumnHasValue(GridColumn.DriverName, true);

            driver.Reset();

            Assert.Equal(1, driver.Id);

            assert_properties_have_default_values(driver);
        }
Ejemplo n.º 2
0
        public void can_get_and_set_which_column_has_a_value()
        {
            var driver = new LiveDriver(1);

            foreach(GridColumn column in Enum.GetValues(typeof(GridColumn)))
            {
                Assert.False(driver.ColumnHasValue(column));
                driver.SetColumnHasValue(column, true);
                Assert.True(driver.ColumnHasValue(column));
                driver.SetColumnHasValue(column, false);
                Assert.False(driver.ColumnHasValue(column));
                driver.SetColumnHasValue(column, true);
            }
        }