Ejemplo n.º 1
0
        public void MonitorManager_Add_Adds_One_Monitor_To_The_List()
        {
            //Arrange
            MonitorManager target  = new MonitorManager();
            Monitor        monitor = new Monitor();

            //Act
            target.Initialize();
            target.Add(monitor);

            //Assert
            Assert.IsTrue(target.Monitors.Length == 1);
            Assert.AreEqual(monitor, target.Monitors[0]);
        }
Ejemplo n.º 2
0
 private void SaveButton_Click(object sender, RoutedEventArgs e)
 {
     monitorManager.Add(monitorManager.CreateMonitor(DateTime.Now.ToString(), "http://laumania.net"));
     monitorManager.SaveMonitors();
     MonitorsListBox.ItemsSource = monitorManager.Monitors;
 }