Ejemplo n.º 1
0
 private void ResetTest()
 {
     TestComment = string.Empty;
     TestSteps.Clear();
     foreach (var ts in Map(_execution.Steps))
     {
         TestSteps.Add(ts);
     }
 }
Ejemplo n.º 2
0
 private void TestPlanListView_DbClick(object sender, EventArgs e)
 {
     tabControl2.SelectTab(0);
     TestSteps.Clear();
     foreach (string file in fileList)
     {
         string fileName = TestPlanListView.SelectedItems[0].SubItems[2].Text + ".lua";
         if (file.ToLower().Contains(fileName.Trim().ToLower()))
         {
             ParseLuaTestCases(file);
         }
     }
 }
Ejemplo n.º 3
0
 private void TestPlanList_DoubleClick(object sender, EventArgs e)
 {
     tabControl2.SelectTab(0);
     TestSteps.Clear();
     foreach (string file in fileList)
     {
         string fileName = TestPlanList.SelectedItem.ToString().Substring(TestPlanList.SelectedItem.ToString().IndexOf(' ')) + ".lua";
         if (file.ToLower().Contains(fileName.Trim().ToLower()))
         {
             ParseLuaTestCases(file);
         }
     }
 }
Ejemplo n.º 4
0
 private void ParseLuaTestCases(string file)
 {
     TestSteps.Clear();
     string[] lines = File.ReadAllLines(file, Encoding.Default);
     foreach (string str in lines)
     {
         if (str.Contains("--"))
         {
             TestSteps.SelectionColor = Color.Green;
         }
         else if (str.Contains("TestCaseBegin") || str.Contains("TestCaseEnd"))
         {
             TestSteps.SelectionColor = Color.Blue;
         }
         else
         {
             TestSteps.SelectionColor = Color.Black;
         }
         TestSteps.AppendText(str);
         TestSteps.AppendText(Environment.NewLine);
     }
 }