Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public YearSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _year = DateTime.Now.Year;
 }
Exemplo n.º 3
0
 public MonthSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _month = DateTime.Now.Month;
 }
Exemplo n.º 4
0
 public MinuteSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _minute = DateTime.Now.Minute;
 }
Exemplo n.º 5
0
 public HourSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _hour = DateTime.Now.Hour;
 }
Exemplo n.º 6
0
 public FinishedSetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
 }
Exemplo n.º 7
0
 public DaySetupState(ClockSetup clockSetup)
 {
     _clockSetup = clockSetup;
     _day = DateTime.Now.Day;
 }