public void ManualFlashTest()
        {
            var cs = new CherryService();
            var tp = new TimeProvider();
            var ps = new PomodoroSensor();
            var ic = new IconController();
            var icn = new CherryTomato.Reminders.SystrayIconNotifier.IconNotifier();

            cs.PluginRepository.RegisterPlugin(tp);
            cs.PluginRepository.RegisterPlugin(ps);
            cs.PluginRepository.RegisterPlugin(ic);
            cs.PluginRepository.RegisterPlugin(icn);
            cs.InitializeCherryServiceEventsAndCommands();
            cs.PluginRepository.TieEvents();

            icn.Notify(new IconNotification { FlashCount = 10, FlashIconPath = "res://pomodoro.ico", NotificationText = "Flash test" });

            Assert.That(MessageBox.Show("Did the icon flash?", "Manual assert", MessageBoxButtons.YesNo),
                        Is.EqualTo(DialogResult.Yes));

            cs.Dispose();
        }
Beispiel #2
0
        public void ManualFlashTest()
        {
            var cs  = new CherryService();
            var tp  = new TimeProvider();
            var ps  = new PomodoroSensor();
            var ic  = new IconController();
            var icn = new CherryTomato.Reminders.SystrayIconNotifier.IconNotifier();

            cs.PluginRepository.RegisterPlugin(tp);
            cs.PluginRepository.RegisterPlugin(ps);
            cs.PluginRepository.RegisterPlugin(ic);
            cs.PluginRepository.RegisterPlugin(icn);
            cs.InitializeCherryServiceEventsAndCommands();
            cs.PluginRepository.TieEvents();

            icn.Notify(new IconNotification {
                FlashCount = 10, FlashIconPath = "res://pomodoro.ico", NotificationText = "Flash test"
            });

            Assert.That(MessageBox.Show("Did the icon flash?", "Manual assert", MessageBoxButtons.YesNo),
                        Is.EqualTo(DialogResult.Yes));

            cs.Dispose();
        }