Esempio n. 1
0
 private void AnswerSetting(SolarCollectorSettingEventArg settingEvent)
 {
     switch (settingEvent.SettingKey)
     {
         case Setting.DeltaEngineStopped:
             _communicationInterface.AddSetSetting(settingEvent.SettingKey,_dbHandler.GetSetting(ConfigKey.DeltaEngineStopped));
             break;
         case Setting.BoilerTop:
             _communicationInterface.AddSetSetting(settingEvent.SettingKey, _dbHandler.GetSetting(ConfigKey.BoilerTop));
             break;
         case Setting.SolarCollectorMin:
             _communicationInterface.AddSetSetting(settingEvent.SettingKey, _dbHandler.GetSetting(ConfigKey.CollectorMin));
             break;
         case Setting.SolarCollectorMax:
             _communicationInterface.AddSetSetting(settingEvent.SettingKey, _dbHandler.GetSetting(ConfigKey.CollectorMax));
             break;
         case Setting.DeltaEngineRunning:
             _communicationInterface.AddSetSetting(settingEvent.SettingKey, _dbHandler.GetSetting(ConfigKey.DeltaEngineRunning));
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
 public void SettingKeyKeySetCorrectly(string row, Setting expectedValue)
 {
     var eventArg = new SolarCollectorSettingEventArg(row);
     Assert.That(eventArg.SettingKey, Is.EqualTo(expectedValue));
 }
 public void FormattedSetCorrectly(string row, string expectedValue)
 {
     var eventArg = new SolarCollectorSettingEventArg(row);
     Assert.That(eventArg.Formatted, Is.EqualTo(expectedValue));
 }