public void CanUpdate_1_Updater()
        {
            var configUpdater = new ConfigChangeHandlerFarm(new List<IConfigChangeHandler> { _updater });
            configUpdater.UpdateAll(_configSettings);

            _updater.AssertWasCalled(u=>u.ConfigUpdated(_configSettings));
        }
        public void CanUpdate_2_Updaters()
        {
            var updater2 = MockRepository.GenerateMock<IConfigChangeHandler>();

            var configUpdater = new ConfigChangeHandlerFarm(new List<IConfigChangeHandler> { _updater, updater2 });
            configUpdater.UpdateAll(_configSettings);

            _updater.AssertWasCalled(u => u.ConfigUpdated(_configSettings));
            updater2.AssertWasCalled(u => u.ConfigUpdated(_configSettings));
        }
Ejemplo n.º 3
0
        public CradiatorPresenter(ICradiatorView view, IConfigSettings configSettings,
		                          IConfigFileWatcher configFileWatcher, ISkinLoader skinLoader,
		                          ConfigChangeHandlerFarm changeHandlerFarm, IScreenUpdater screenUpdater,
		                          InputBindingAdder inputBindingAdder)
        {
            _view = view;
            view.Presenter = this;
            _configSettings = configSettings;
            _configFileWatcher = configFileWatcher;
            _screenUpdater = screenUpdater;
            _skinLoader = skinLoader;
            _changeHandlerFarm = changeHandlerFarm;

            inputBindingAdder.AddBindings();
            configSettings.AddObserver(this);
        }