public void Setup() { factory = new HolidayCalendarFactoryFake { date = new DateTime(2017, 03, 23) }; timer = new Mock <ITimer>(MockBehavior.Strict); factory.timer = timer.Object; timetastic = new Mock <Model.ITimetasticHolidayDownloader>(MockBehavior.Strict); factory.timetasticHolidayDownloader = timetastic.Object; HolidayCalendarFactory.Instance = factory; HolidayCalendarUpdate_Days = null; HolidayCalendarUpdate_Event = new ManualResetEvent(false); presenter = new TimetasticHolidayCalendarPresenter(new InformationRadiatorItemConfiguration()); presenter.HolidayCalendarUpdate += (sender, args) => { HolidayCalendarUpdate_Days = args.Days; HolidayCalendarUpdate_Event.Set(); }; }
public void Setup() { timer = new Mock <ITimer>(MockBehavior.Strict); leave = new LeaveDetails(); factory = new HolidayCalendarFactoryFake(); factory.timer = timer.Object; HolidayCalendarFactory.Instance = factory; }