Exemple #1
0
 protected bool Equals(BaseTestRunCriteria other)
 {
     return(this.KeepAlive == other.KeepAlive &&
            string.Equals(this.TestRunSettings, other.TestRunSettings) &&
            this.FrequencyOfRunStatsChangeEvent == other.FrequencyOfRunStatsChangeEvent &&
            this.RunStatsChangeEventTimeout.Equals(other.RunStatsChangeEventTimeout));
 }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestRunCriteria"/> class.
        /// </summary>
        /// <param name="tests">
        /// Tests which should be executed
        /// </param>
        /// <param name="baseTestRunCriteria">
        /// The BaseTestRunCriteria
        /// </param>
        public TestRunCriteria(IEnumerable <TestCase> tests, BaseTestRunCriteria baseTestRunCriteria)
            : base(baseTestRunCriteria)
        {
            var testCases = tests as IList <TestCase> ?? tests.ToList();

            ValidateArg.NotNullOrEmpty(testCases, "tests");

            this.Tests = testCases;
        }
Exemple #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseTestRunCriteria"/> class.
        /// </summary>
        /// <param name="runCriteria">
        /// Run criteria to clone.
        /// </param>
        public BaseTestRunCriteria(BaseTestRunCriteria runCriteria)
        {
            ValidateArg.NotNull(runCriteria, "runCriteria");

            this.FrequencyOfRunStatsChangeEvent = runCriteria.FrequencyOfRunStatsChangeEvent;
            this.KeepAlive                  = runCriteria.KeepAlive;
            this.TestRunSettings            = runCriteria.TestRunSettings;
            this.RunStatsChangeEventTimeout = runCriteria.RunStatsChangeEventTimeout;
            this.TestHostLauncher           = runCriteria.TestHostLauncher;
        }
Exemple #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestRunCriteria"/> class.
        /// Create the TestRunCriteria for a test run
        /// </summary>
        /// <param name="sources">
        /// Sources which contains tests that should be executed
        /// </param>
        /// <param name="baseTestRunCriteria">
        /// The BaseTestRunCriteria
        /// </param>
        public TestRunCriteria(IEnumerable <string> sources, BaseTestRunCriteria baseTestRunCriteria)
            : base(baseTestRunCriteria)
        {
            var testSources = sources as IList <string> ?? sources.ToArray();

            ValidateArg.NotNullOrEmpty(testSources, "sources");

            this.AdapterSourceMap = new Dictionary <string, IEnumerable <string> >();
            this.AdapterSourceMap.Add(Constants.UnspecifiedAdapterPath, testSources);
        }