SetTime() public method

Sets the qually time for the specified one-based qually number.
/// Thrown when is not positive or is greater than three. ///
public SetTime ( int quallyNumber, System.TimeSpan value ) : void
quallyNumber int The one-based qually number.
value System.TimeSpan The new qually value.
return void
        public void can_get_a_qually_time()
        {
            TimeSpan time;
            var model = new QuallyTimesModel();

            time = TimeSpan.FromSeconds(1d);
            model.SetTime(1, time);
            Assert.Equal(time, model.GetTime(1));

            time = TimeSpan.FromSeconds(2d);
            model.SetTime(2, time);
            Assert.Equal(time, model.GetTime(2));

            time = TimeSpan.FromSeconds(3d);
            model.SetTime(3, time);
            Assert.Equal(time, model.GetTime(3));
        }
        public void can_set_a_qually_time()
        {
            TimeSpan time;
            var model = new QuallyTimesModel();

            time = TimeSpan.FromSeconds(1d);
            model.SetTime(1, time);
            Assert.Equal(time, model.Q1);
            model.SetTime(1, null);
            Assert.Null(model.Q1);

            time = TimeSpan.FromSeconds(2d);
            model.SetTime(2, time);
            Assert.Equal(time, model.Q2);
            model.SetTime(2, null);
            Assert.Null(model.Q2);

            time = TimeSpan.FromSeconds(3d);
            model.SetTime(3, time);
            Assert.Equal(time, model.Q3);
            model.SetTime(3, null);
            Assert.Null(model.Q3);
        }
        public void changes_to_the_qually_time_properties_raise_the_property_changed_event()
        {
            var model = new QuallyTimesModel();
            var observer = model.CreateObserver();

            model.SetTime(1, TimeSpan.FromSeconds(1d));
            Assert.True(observer.HasChanged(x => x.Q1));

            model.SetTime(2, TimeSpan.FromSeconds(2d));
            Assert.True(observer.HasChanged(x => x.Q2));

            model.SetTime(3, TimeSpan.FromSeconds(3d));
            Assert.True(observer.HasChanged(x => x.Q3));
        }