示例#1
0
		/// <summary>
		/// Private function that reads all selected XML files and creates
		/// an ArrayList of Run objects containing all needed information to run each test
		/// in each XML test file.
		/// </summary>
		/// <param name="selectedFiles"></param>
		/// <returns>An ArrayList containing a Run object for each XML test file</returns>
		private ArrayList CreateRuns(string [] selectedFiles)
		{
			// check to make sure there are filenames in the string array...
			if(selectedFiles.Length == 0)
			{
				throw new ArgumentException("Argument length is 0.", "selectedFiles");
			}

			// get an ArrayList to hold the runs...
			ArrayList runs = new ArrayList();

			// get a TestFileReader object to read the XML test files...
			TestFileReader tReader = new TestFileReader();

			// loop through all the filenames and create the Run objects for each file...
			for(int i = 0; i < selectedFiles.Length; i++)
			{
				string fileName = selectedFiles[i];

				// create the Run object from the file...
				Run newRun = tReader.ReadTestFile(fileName);
				// store the XML filename in the Run object to display in the textbox later...
				newRun.Filename = fileName;

				// add the new Run to the runs ArrayList...
				runs.Add(newRun);
			}
			return runs;
		}
示例#2
0
        private Run GetTestRun(string filename)
        {
            TestFileReader tReader = new TestFileReader();
            Run            r       = tReader.ReadTestFile(filename + ".xml");

            return(r);
        }
示例#3
0
        /// <summary>
        /// Private function that reads all selected XML files and creates
        /// an ArrayList of Run objects containing all needed information to run each test
        /// in each XML test file.
        /// </summary>
        /// <param name="selectedFiles"></param>
        /// <returns>An ArrayList containing a Run object for each XML test file</returns>
        private ArrayList CreateRuns(string [] selectedFiles)
        {
            // check to make sure there are filenames in the string array...
            if (selectedFiles.Length == 0)
            {
                throw new ArgumentException("Argument length is 0.", "selectedFiles");
            }

            // get an ArrayList to hold the runs...
            ArrayList runs = new ArrayList();

            // get a TestFileReader object to read the XML test files...
            TestFileReader tReader = new TestFileReader();

            // loop through all the filenames and create the Run objects for each file...
            for (int i = 0; i < selectedFiles.Length; i++)
            {
                string fileName = selectedFiles[i];

                // create the Run object from the file...
                Run newRun = tReader.ReadTestFile(fileName);
                // store the XML filename in the Run object to display in the textbox later...
                newRun.Filename = fileName;

                // add the new Run to the runs ArrayList...
                runs.Add(newRun);
            }
            return(runs);
        }
示例#4
0
		private Run GetTestRun(string filename)
		{
			TestFileReader tReader = new TestFileReader();
			Run r = tReader.ReadTestFile(filename + ".xml");
			return r;
		}