public void SetUp() { monitor = new StatusMonitorStub(); monitor.DataLoadError += monitor_DataLoadError; monitor.DataLoaded += monitor_DataLoaded; monitor.DashboardStatusChanged += monitor_DashboardStatusChanged; monitor.NewBuildAvailable += monitor_NewBuildAvailable; fakeStatus = new XmlDocument(); projectNodes = fakeStatus.CreateElement("projects"); fakeStatus.AppendChild(projectNodes); monitor.Document = fakeStatus; errorEventArgs = null; loadEventArgs = null; statusChangedEventArgs = null; newBuildEventArgs = null; }
void monitor_DashboardStatusChanged(object source, DashboardStatusChangedEventArgs e) { statusChangedEventArgs = e; }
private void onDashboardStatusChanged(object source, DashboardStatusChangedEventArgs e) { lock(activeIcons) { if (e.Status.FailuresPresent) { if (e.Status.CurrentlyBuilding) { activeIcons = BuildingFailing; } else { activeIcons = Fail; } } else { if (e.Status.CurrentlyBuilding) { activeIcons = BuildingPassing; } else { activeIcons = Pass; } } } }