Exemple #1
0
        public void ExploreTests_WithoutLoad_ThrowsInvalidOperation()
        {
            var ex = Assert.Throws <InvalidOperationException>(
                () => _runner.ExploreTests(TestFilter.Empty));

            Assert.That(ex.Message, Is.EqualTo("Tests must be loaded before exploring them."));
        }
Exemple #2
0
        public void ExploreTests_WithoutLoad_ThrowsInvalidOperation()
        {
            var ex = Assert.Throws <InvalidOperationException>(
                () => _runner.ExploreTests(TestFilter.Empty));

            Assert.That(ex.Message, Is.EqualTo("The ExploreTests method was called but no test has been loaded"));
        }
Exemple #3
0
        private int ExploreTests(ITestFilter filter)
        {
            ITest testNode = _runner.ExploreTests(filter);

            var specs = _options.ExploreOutputSpecifications;

            if (specs.Count == 0)
            {
                new TestCaseOutputWriter().WriteTestFile(testNode, Console.Out);
            }
            else
            {
                var outputManager = new OutputManager(_options.WorkDirectory);

                foreach (var spec in _options.ExploreOutputSpecifications)
                {
                    outputManager.WriteTestFile(testNode, spec);
                }
            }

            return(OK);
        }
 /// <inheritdoc />
 public ITest ExploreTests(ITestFilter filter)
 {
     return(v_Runner.ExploreTests(filter));
 }