configuration settings
상속: INotifyPropertyChanged, IConfigSettings
예제 #1
0
        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...");
            }
        }
예제 #2
0
        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"));
        }
예제 #3
0
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     SetLocalValuesFromConfig(newSettings);
 }
예제 #4
0
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     SetGuiltStrategy(newSettings);
 }
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     _isShowProgressConfigured = newSettings.ShowProgress;
     _pollFrequency = newSettings.PollFrequency;
 }
예제 #6
0
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     _cruiseAddress.Url = newSettings.URL;
     _webClient = _webClientFactory.GetWebClient(newSettings.URL);
 }
예제 #7
0
 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);
 }
예제 #10
0
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     _brokenBuildText = newSettings.BrokenBuildText;
     _fixedBuildText = newSettings.FixedBuildText;
 }
예제 #11
0
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     _viewUrl.Url = newSettings.URL;
     _webClient = _webClientFactory.GetWebClient(newSettings.URL);
 }
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     _usernameMap = newSettings.UsernameMap;
 }
예제 #13
0
 void IConfigObserver.ConfigUpdated(ConfigSettings newSettings)
 {
     _playSounds = newSettings.PlaySounds;
     _playSpeech = newSettings.PlaySpeech;
     _speechVoiceName = newSettings.SpeechVoiceName;
 }
 public void SetUp()
 {
     _updater = MockRepository.GenerateMock<IConfigChangeHandler>();
     _configSettings = new ConfigSettings();
 }
예제 #15
0
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     _changeHandlerFarm.UpdateAll(newSettings);
 }
 public void ConfigUpdated(ConfigSettings newSettings)
 {
     SetRegex(newSettings);
 }
예제 #17
0
        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}
            };
        }