Exemple #1
0
 /// <summary>
 /// Inserts a test on a particular position in the list
 /// </summary>
 /// <param name="test">The test to be inserted </param>
 /// <param name="zeroIndexPosition">The position (negative or positive)</param>
 /// <returns>true if sucess</returns>
 public bool InsertTest(wxTest test, int zeroIndexPosition)
 {
     if (Math.Abs(zeroIndexPosition) > tests.Count)
     {
         Wxs.Instance.Log.ErrorFormat("Error inserting test on position {0}: test count is {1}",
                                      zeroIndexPosition, tests.Count);
         return(false);
         //throw new IndexOutOfRangeException("Cannot insert test beyond capacity");
     }
     if (zeroIndexPosition < 0) // allow negative index insertions (like python)
     {
         tests.Insert(tests.Count + zeroIndexPosition, test);
     }
     else
     {
         tests.Insert(zeroIndexPosition, test);
     }
     return(true);
 }
Exemple #2
0
 /// <summary>
 /// Adds a test to test list
 /// </summary>
 /// <param name="test"></param>
 public void AddTest(wxTest test)
 {
     tests.Add(test);
 }