// Called instead of TestStart, TestFinished is still called
        public void TestSkipped(string name, string type, string method, string reason)
        {
            // TODO: What happens if a theory is skipped?
            var task = taskProvider.GetMethodTask(name, type, method);

            server.TaskStarting(task);

            var state = new TaskState(task, reason, TaskResult.Skipped);

            states.Push(state);
        }
Пример #2
0
        // Called instead of TestStart, TestFinished is still called
        public void TestSkipped(string name, string type, string method, string reason)
        {
            var state = CurrentState;

            if (!state.IsTheory())
            {
                var task = taskProvider.GetMethodTask(name, type, method);

                // SkipCommand returns null from ToStartXml, so we don't get notified via TestStart. Custom
                // commands might not do this, so we make sure we don't notify task starting twice
                StartNewMethodTaskIfNotAlreadyRunning(task);
            }

            CurrentState.Result  = TaskResult.Skipped;
            CurrentState.Message = reason;
        }