private TeamCityEventListener CreateInstance(ITeamCityInfo teamCityInfo = null)
 {
     return(new TeamCityEventListener(_outputWriter, teamCityInfo != null ? teamCityInfo : new TeamCityInfo())
     {
         RootFlowId = string.Empty
     });
 }
Esempio n. 2
0
        public EventId(ITeamCityInfo tamCityInfo, string flowId, string fullName)
        {
            FlowId = flowId;
            // TeamCity extracts the name of assembly from the test name
            // For instance:
            //
            // abc.dll: text1:text2
            // assembly name = "abc.dll: text1"
            // test name = "text2"
            //
            // or
            //
            // abc.dll: text1
            // assembly name = "abc.dll"
            // test name = "text1"

            FullName = fullName.Replace(":", tamCityInfo.ColonReplacement);
        }
Esempio n. 3
0
        public TeamCityEventListener(TextWriter outWriter, ITeamCityInfo teamCityInfo)
        {
            if (outWriter == null)
            {
                throw new ArgumentNullException("outWriter");
            }
            if (teamCityInfo == null)
            {
                throw new ArgumentNullException("teamCityInfo");
            }

            _outWriter    = outWriter;
            _teamCityInfo = teamCityInfo;

            _serviceMessageWriter = new ServiceMessageWriter();
            var serviceMessageFactory = new ServiceMessageFactory(_teamCityInfo, new SuiteNameReplacer(_teamCityInfo));
            var hierarchy             = new Hierarchy();

            _eventConverter2 = new EventConverter2(serviceMessageFactory, hierarchy, _statistics, _teamCityInfo);
            _eventConverter3 = new EventConverter3(serviceMessageFactory, hierarchy, _statistics, _teamCityInfo);
            RootFlowId       = _teamCityInfo.RootFlowId;
        }
        public EventConverter2(IServiceMessageFactory serviceMessageFactory, IHierarchy hierarchy, Statistics statistics, ITeamCityInfo teamCityInfo)
        {
            if (serviceMessageFactory == null)
            {
                throw new ArgumentNullException("serviceMessageFactory");
            }
            if (hierarchy == null)
            {
                throw new ArgumentNullException("hierarchy");
            }
            if (statistics == null)
            {
                throw new ArgumentNullException("statistics");
            }
            if (teamCityInfo == null)
            {
                throw new ArgumentNullException("teamCityInfo");
            }

            _serviceMessageFactory = serviceMessageFactory;
            _hierarchy             = hierarchy;
            _statistics            = statistics;
            _teamCityInfo          = teamCityInfo;
        }
Esempio n. 5
0
 public SuiteNameReplacer(ITeamCityInfo teamCityInfo)
 {
     _teamCityInfo = teamCityInfo;
 }
 public ServiceMessageFactory(ITeamCityInfo teamCityInfo, ISuiteNameReplacer suiteNameReplacer)
 {
     _teamCityInfo      = teamCityInfo;
     _suiteNameReplacer = suiteNameReplacer;
 }