public void CopyConfigToAppSettingsDoesNotUpdateValuesForKeysThatDoNotAlreadyExist() { var asi = new AppSettingsInitializer(_config, _webConfigReader); asi.CopyConfigToAppSettings(_webConfigWriter); _webConfigWriter.DidNotReceive().SetAppSetting("app_setting_3", "new_value_3"); }
public void CopyConfigToAppSettingsUpdatesValuesFromConfig() { var asi = new AppSettingsInitializer(_config, _webConfigReader); asi.CopyConfigToAppSettings(_webConfigWriter); _webConfigWriter.Received().SetAppSetting("app_setting_2", "new_value_2"); }
public void CopyConfigToAppSettingsThrowsWhenWebConfigWriterIsNull() { var asi = new AppSettingsInitializer(_config, _webConfigReader); Assert.Throws <ArgumentNullException>(() => asi.CopyConfigToAppSettings(null)); }