Пример #1
0
 public TestCaseSelectedArgs(string storedProcedureName, SqlSync.SprocTest.Configuration.TestCase testCase)
 {
     this.StoredProcedureName = storedProcedureName;
     this.TestCase            = testCase;
 }
Пример #2
0
 public static string GenerateTestSql(string storedProcedureName, string databaseName, Configuration.TestCase testCase)
 {
     System.Text.StringBuilder sb = new StringBuilder("exec " + databaseName + "." + storedProcedureName + " ");
     if (testCase.Parameter != null)
     {
         for (int i = 0; i < testCase.Parameter.Length; i++)
         {
             sb.Append(testCase.Parameter[i].Name + "=");
             if (testCase.Parameter[i].Value.ToUpper().Trim() == "NULL")
             {
                 sb.Append("NULL,");
             }
             else
             {
                 sb.Append("'" + testCase.Parameter[i].Value + "',");
             }
         }
         sb.Length = sb.Length - 1;
     }
     return(sb.ToString());
 }