/// <summary> /// Modifies Server Spring parameters by adding given providers spring object in the spring config /// </summary> /// <param name="springFileName"></param> /// <returns></returns> private bool ModifyServerSpringParameters(string springFileName) { try { string appConfigName = "TradeHub.OrderExecutionEngine.Server.WindowsService.exe.config"; string appConfigPath = _orderExecutionProvidersRootFolderPath + appConfigName; // Modify configuration file return(XmlFileManager.ModifyAppConfigForSpringObject(appConfigPath, @"~/Config/" + springFileName)); } catch (Exception exception) { Logger.Error(exception, _type.FullName, "ModifyServerSpringParameters"); return(false); } }
public void ModifyApplicationConfigFile() { bool result = XmlFileManager.ModifyAppConfigForSpringObject("SampleConfigFile.config", @"~/Config/Sample"); Assert.IsTrue(result); }