Пример #1
0
        public void StateTestCase()
        {
            var clockSetup = new ClockSetup();
            //set year
            clockSetup.RotateKnobRight();
            clockSetup.PushKnob();
            //month
            clockSetup.RotateKnobRight();
            clockSetup.RotateKnobRight();
            clockSetup.PushKnob();
            //day
            clockSetup.RotateKnobRight();
            clockSetup.RotateKnobRight();
            clockSetup.RotateKnobRight();
            clockSetup.PushKnob();
            //hour
            clockSetup.RotateKnobLeft();
            clockSetup.RotateKnobLeft();
            clockSetup.PushKnob();
            //minute
            clockSetup.RotateKnobRight();
            clockSetup.PushKnob();
            //finished
            clockSetup.PushKnob();

            var day = DateTime.Now.Day + 3;
            //awas wey!! podria dar false si el dia pasa del maximo del mes
            Assert.AreEqual(day, clockSetup.DaySetupState.SelectedValue);
        }
Пример #2
0
 public YearSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _year = DateTime.Now.Year;
 }
Пример #3
0
 public MonthSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _month = DateTime.Now.Month;
 }
Пример #4
0
 public MinuteSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _minute = DateTime.Now.Minute;
 }
Пример #5
0
 public HourSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _hour = DateTime.Now.Hour;
 }
Пример #6
0
 public FinishedSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
 }
Пример #7
0
 public DaySetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _day = DateTime.Now.Day;
 }