コード例 #1
0
        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");
        }
コード例 #2
0
 public TestAccount(AccountInConfig accountInConfig)
     : this(GetConnectionString(accountInConfig))
 {
 }
コード例 #3
0
        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");
        }
コード例 #4
0
 public TestAccount(AccountInConfig accountInConfig)
     : this(GetConnectionString(accountInConfig))
 {
 }