예제 #1
0
        public void MonitorManager_PingMonitors_Should_Leave_Some_HistoryData()
        {
            //Arrange
            int            monitorAmount = 5;
            MonitorManager manager       = new MonitorManager();
            List <Monitor> monitors      = HelperMethods.GenerateMonitorList(monitorAmount);

            //Act
            manager.Initialize();
            manager.AddMany(monitors);
            manager.SaveMonitors();
            manager.PingMonitors();

            //Assert
            Assert.IsTrue(File.Exists("Data/" + DateTime.Now.ToShortDateString() + ".xml")); //Bad check, come up with something else!
        }
예제 #2
0
 private void PingButton_Click(object sender, RoutedEventArgs e)
 {
     monitorManager.PingMonitors();
 }