private static string GetConnectionString(AccountInConfig accountInConfig) { if (accountInConfig == AccountInConfig.Primary) { return(Test.Data.Get(DMLibTestConstants.ConnStr)); } else if (accountInConfig == AccountInConfig.Secondary) { return(Test.Data.Get(DMLibTestConstants.ConnStr2)); } throw new ArgumentException(string.Format("Invalid accountInConfig value: {0}", accountInConfig), "accountInConfig"); }
public TestAccount(AccountInConfig accountInConfig) : this(GetConnectionString(accountInConfig)) { }
private static string GetConnectionString(AccountInConfig accountInConfig) { if (accountInConfig == AccountInConfig.Primary) { return Test.Data.Get(DMLibTestConstants.ConnStr); } else if (accountInConfig == AccountInConfig.Secondary) { return Test.Data.Get(DMLibTestConstants.ConnStr2); } throw new ArgumentException(string.Format("Invalid accountInConfig value: {0}", accountInConfig), "accountInConfig"); }