public static void OrderIsUnpredictable()
    {
        var orderer = new DefaultTestCaseOrderer();

        var result = orderer.OrderTestCases(TestCases);

        Assert.NotEqual(TestCases, result);
    }
    public static void OrderIsStable()
    {
        var orderer = new DefaultTestCaseOrderer();

        var result1 = orderer.OrderTestCases(TestCases);
        var result2 = orderer.OrderTestCases(TestCases);
        var result3 = orderer.OrderTestCases(TestCases);

        Assert.Equal(result1, result2);
        Assert.Equal(result2, result3);
    }
Exemple #3
0
 public TestAssemblyRunner(IAssemblyInfo assemblyInfo,
                           IEnumerable<ITestCase> testCases,
                           IMessageSink messageSink,
                           ITestFrameworkOptions executionOptions)
 {
     AssemblyInfo = assemblyInfo;
     AssemblyFileName = AssemblyInfo.AssemblyPath;
     TestCases = testCases;
     MessageSink = messageSink;
     ExecutionOptions = executionOptions;
     TestCaseOrderer = new DefaultTestCaseOrderer();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TestAssemblyRunner{TTestCase}"/> class.
 /// </summary>
 /// <param name="testAssembly">The assembly that contains the tests to be run.</param>
 /// <param name="testCases">The test cases to be run.</param>
 /// <param name="messageSink">The message sink to report run status to.</param>
 /// <param name="executionOptions">The user's requested execution options.</param>
 public TestAssemblyRunner(ITestAssembly testAssembly,
                           IEnumerable <TTestCase> testCases,
                           IMessageSink messageSink,
                           ITestFrameworkOptions executionOptions)
 {
     TestAssembly     = testAssembly;
     TestCases        = testCases;
     MessageSink      = messageSink;
     ExecutionOptions = executionOptions;
     TestCaseOrderer  = new DefaultTestCaseOrderer();
     Aggregator       = new ExceptionAggregator();
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestAssemblyRunner{TTestCase}"/> class.
 /// </summary>
 /// <param name="testAssembly">The assembly that contains the tests to be run.</param>
 /// <param name="testCases">The test cases to be run.</param>
 /// <param name="diagnosticMessageSink">The message sink to report diagnostic messages to.</param>
 /// <param name="executionMessageSink">The message sink to report run status to.</param>
 /// <param name="executionOptions">The user's requested execution options.</param>
 protected TestAssemblyRunner(ITestAssembly testAssembly,
                              IEnumerable <TTestCase> testCases,
                              IMessageSink diagnosticMessageSink,
                              IMessageSink executionMessageSink,
                              ITestFrameworkExecutionOptions executionOptions)
 {
     TestAssembly          = testAssembly;
     TestCases             = testCases;
     DiagnosticMessageSink = diagnosticMessageSink;
     ExecutionMessageSink  = executionMessageSink;
     ExecutionOptions      = executionOptions;
     TestCaseOrderer       = new DefaultTestCaseOrderer(diagnosticMessageSink);
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestAssemblyRunner{TTestCase}"/> class.
 /// </summary>
 /// <param name="testAssembly">The assembly that contains the tests to be run.</param>
 /// <param name="testCases">The test cases to be run.</param>
 /// <param name="diagnosticMessageSink">The message sink to report diagnostic messages to.</param>
 /// <param name="executionMessageSink">The message sink to report run status to.</param>
 /// <param name="executionOptions">The user's requested execution options.</param>
 public TestAssemblyRunner(ITestAssembly testAssembly,
                           IEnumerable <TTestCase> testCases,
                           IMessageSink diagnosticMessageSink,
                           IMessageSink executionMessageSink,
                           ITestFrameworkExecutionOptions executionOptions)
 {
     TestAssembly          = testAssembly;
     TestCases             = testCases;
     DiagnosticMessageSink = diagnosticMessageSink;
     ExecutionMessageSink  = executionMessageSink;
     ExecutionOptions      = executionOptions;
     TestCaseOrderer       = new DefaultTestCaseOrderer();
     TestCollectionOrderer = new DefaultTestCollectionOrderer();
     Aggregator            = new ExceptionAggregator();
 }