示例#1
0
 public TeamCityVisitor(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();
 }
示例#2
0
 public TeamCityVisitor(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();
 }
示例#3
0
 public TeamCityVisitor(ConsoleLogger console,
                        XElement assembliesElement,
                        Func<bool> cancelThunk,
                        Func<string, string> flowIdMapper = null,
                        TeamCityDisplayNameFormatter displayNameFormatter = null)
     : base(assembliesElement, cancelThunk)
 {
     this.console = console;
     this.flowIdMapper = flowIdMapper ?? (_ => Guid.NewGuid().ToString("N"));
     this.displayNameFormatter = displayNameFormatter ?? new TeamCityDisplayNameFormatter();
 }
示例#4
0
 public TeamCityVisitor(ConsoleLogger console,
                        XElement assembliesElement,
                        Func <bool> cancelThunk,
                        Func <string, string> flowIdMapper = null,
                        TeamCityDisplayNameFormatter displayNameFormatter = null)
     : base(assembliesElement, cancelThunk)
 {
     this.console              = console;
     this.flowIdMapper         = flowIdMapper ?? (_ => Guid.NewGuid().ToString("N"));
     this.displayNameFormatter = displayNameFormatter ?? new TeamCityDisplayNameFormatter();
 }
示例#5
0
        public StressTestTeamCityReporterMessageHandler(IRunnerLogger logger,
                                                        Func <string, string> flowIdMapper = null,
                                                        TeamCityDisplayNameFormatter displayNameFormatter = null) : base(logger, flowIdMapper, displayNameFormatter)
        {
            _logger = logger;

            // I know, I know, but I want them so bad and ITestProgressMessage and ITestStatisticsMessage won't
            // be written too often, so should not hurt repformance.

            var escapeMethodInfo = typeof(TeamCityReporterMessageHandler).GetMethod("Escape", BindingFlags.Static | BindingFlags.NonPublic);

            _escape = (s) => (string)escapeMethodInfo.Invoke(this, new[] { s });

            var toFlowIdMethodInfo = typeof(TeamCityReporterMessageHandler).GetMethod("ToFlowId", BindingFlags.Instance | BindingFlags.NonPublic);

            _toFlowId = (s) => (string)toFlowIdMethodInfo.Invoke(this, new[] { s });

            _statisticFolder = StressConfig.Instance.StatisticOutputFolder;
        }
示例#6
0
 TestableTeamCityReporterMessageHandler(SpyRunnerLogger logger, TeamCityDisplayNameFormatter formatter)
     : base(logger, _ => "myFlowId", formatter)
 {
     Messages = logger.Messages;
 }