public static void Main() { try { var app = new CradiatorApp(); var configSettings = new ConfigSettings(); configSettings.Load(); var mainWindow = new CradiatorWindow(configSettings); var bootstrapper = new Bootstrapper(configSettings, mainWindow); var kernel = bootstrapper.CreateKernel(); var presenter = kernel.Get<CradiatorPresenter>(); mainWindow.Show(); presenter.Init(); app.Run(); } catch (Exception exception) { _log.Error(exception.Message, exception); var messageWindow = new MessageWindow(null); messageWindow.ShowMessage(5, "Application Exception - see log for details\nShutting down..."); } }
public void CanCreate() { //TODO not a great test, just scratches the surface var settings = new ConfigSettings(); const string file = @"c:\windows\win.ini"; var configFileWatcher = new ConfigFileWatcher(settings, file); configFileWatcher.Start(); Assert.That(configFileWatcher.FileSystemWatcher.Filter, Is.EqualTo("win.ini")); }
public void ConfigUpdated(ConfigSettings newSettings) { SetLocalValuesFromConfig(newSettings); }
public void ConfigUpdated(ConfigSettings newSettings) { SetGuiltStrategy(newSettings); }
public void ConfigUpdated(ConfigSettings newSettings) { _isShowProgressConfigured = newSettings.ShowProgress; _pollFrequency = newSettings.PollFrequency; }
public void ConfigUpdated(ConfigSettings newSettings) { _cruiseAddress.Url = newSettings.URL; _webClient = _webClientFactory.GetWebClient(newSettings.URL); }
public void ConfigUpdated(ConfigSettings newSettings) { _brokenBuildSound = newSettings.BrokenBuildSound; _fixedBuildSound = newSettings.FixedBuildSound; }
public void RegExFilter_IsUpdated_After_ConfigUpdated() { _configSettings.ProjectNameRegEx = "FooProject|BarProject"; _transformer = new BuildDataTransformer(_configSettings); var projectStatuses = _transformer.Transform(SimilarProjectXml); Assert.That(projectStatuses.Count(), Is.EqualTo(2)); // notify of config change and fetch again var newSettings = new ConfigSettings { ProjectNameRegEx = "BarProject", URL = _cruiseAddress.Url }; _transformer.ConfigUpdated(newSettings); projectStatuses = _transformer.Transform(SimilarProjectXml); Assert.That(projectStatuses.Count(), Is.EqualTo(1)); Assert.That(projectStatuses.First().Name, Is.EqualTo("BarProject")); }
public void ConfigUpdated(ConfigSettings newSettings) { _cruiseAddress.Url = newSettings.URL; _webClient = _webClientFactory.GetWebClient(newSettings.URL, newSettings.Username, newSettings.Password); }
public void ConfigUpdated(ConfigSettings newSettings) { _brokenBuildText = newSettings.BrokenBuildText; _fixedBuildText = newSettings.FixedBuildText; }
public void ConfigUpdated(ConfigSettings newSettings) { _viewUrl.Url = newSettings.URL; _webClient = _webClientFactory.GetWebClient(newSettings.URL); }
public void ConfigUpdated(ConfigSettings newSettings) { _usernameMap = newSettings.UsernameMap; }
void IConfigObserver.ConfigUpdated(ConfigSettings newSettings) { _playSounds = newSettings.PlaySounds; _playSpeech = newSettings.PlaySpeech; _speechVoiceName = newSettings.SpeechVoiceName; }
public void SetUp() { _updater = MockRepository.GenerateMock<IConfigChangeHandler>(); _configSettings = new ConfigSettings(); }
public void ConfigUpdated(ConfigSettings newSettings) { _changeHandlerFarm.UpdateAll(newSettings); }
public void ConfigUpdated(ConfigSettings newSettings) { SetRegex(newSettings); }
public void SetUp() { _audioPlayer = MockRepository.GenerateMock<IAudioPlayer>(); _buildBuster = MockRepository.GenerateMock<IBuildBuster>(); _configSettings = new ConfigSettings { BrokenBuildSound = BrokenSound, FixedBuildSound = FixedSound, PlaySounds = true }; _speechMaker = new SpeechMaker(_configSettings, new SpeechTextParser(_buildBuster)); _discJockey = new DiscJockey(_configSettings, _audioPlayer, _speechMaker); _projectList1Success = new List<ProjectStatus> { new ProjectStatus("bla") { LastBuildStatus = ProjectStatus.SUCCESS } }; _projectList1Failure = new List<ProjectStatus> { new ProjectStatus("bla") { LastBuildStatus = ProjectStatus.FAILURE } }; _projectList2BothSuccess = new List<ProjectStatus> { new ProjectStatus("bla") {LastBuildStatus = ProjectStatus.SUCCESS}, new ProjectStatus("bla2") {LastBuildStatus = ProjectStatus.SUCCESS} }; _projectList2BothFailure = new List<ProjectStatus> { new ProjectStatus("bla") {LastBuildStatus = ProjectStatus.FAILURE}, new ProjectStatus("bla2") {LastBuildStatus = ProjectStatus.FAILURE} }; }