public KuduXunitTeamCityVisitor(TaskLoggingHelper log, XElement assemblyElement, Func<bool> cancelThunk, Func<string, string> flowIdMapper = null, TeamCityDisplayNameFormatter displayNameFormatter = null) : base(log, assemblyElement, cancelThunk) { this.flowIdMapper = flowIdMapper ?? (_ => Guid.NewGuid().ToString("N")); this.displayNameFormatter = displayNameFormatter ?? new TeamCityDisplayNameFormatter(); }
/// <summary> /// Initializes a new instance of the <see cref="TeamCityReporterMessageHandler" /> class. /// </summary> /// <param name="logger">The logger used to report messages</param> /// <param name="flowIdMapper">Optional code which maps a test collection name to a flow ID /// (the default behavior generates a new GUID for each test collection)</param> /// <param name="displayNameFormatter">Optional display name formatter</param> public TeamCityReporterMessageHandler(IRunnerLogger logger, Func <string, string> flowIdMapper = null, TeamCityDisplayNameFormatter displayNameFormatter = null) : base(flowIdMapper) { this.logger = logger; this.displayNameFormatter = displayNameFormatter ?? new TeamCityDisplayNameFormatter(); Diagnostics.ErrorMessageEvent += HandleErrorMessage; Execution.TestAssemblyCleanupFailureEvent += HandleTestAssemblyCleanupFailure; Execution.TestCaseCleanupFailureEvent += HandleTestCaseCleanupFailure; Execution.TestClassCleanupFailureEvent += HandleTestCaseCleanupFailure; Execution.TestCollectionCleanupFailureEvent += HandleTestCollectionCleanupFailure; Execution.TestCollectionFinishedEvent += HandleTestCollectionFinished; Execution.TestCollectionStartingEvent += HandleTestCollectionStarting; Execution.TestCleanupFailureEvent += HandleTestCleanupFailure; Execution.TestFailedEvent += HandleTestFailed; Execution.TestMethodCleanupFailureEvent += HandleTestMethodCleanupFailure; Execution.TestPassedEvent += HandleTestPassed; Execution.TestSkippedEvent += HandleTestSkipped; Execution.TestStartingEvent += HandleTestStarting; }