internal TeamCityTestLogger(
     [NotNull] ITeamCityWriter rootWriter,
     [NotNull] ITestCaseFilter testCaseFilter,
     [NotNull] ISuiteNameProvider suiteNameProvider)
 {
     _rootWriter        = rootWriter ?? throw new ArgumentNullException(nameof(rootWriter));
     _testCaseFilter    = testCaseFilter ?? throw new ArgumentNullException(nameof(testCaseFilter));
     _suiteNameProvider = suiteNameProvider ?? throw new ArgumentNullException(nameof(suiteNameProvider));
     _initialized       = true;
 }
 internal MessageHandler(
     [NotNull] ITeamCityWriter rootWriter,
     [NotNull] ITestCaseFilter testCaseFilter,
     [NotNull] ISuiteNameProvider suiteNameProvider,
     [NotNull] IIdGenerator idGenerator,
     [NotNull] IOptions options)
 {
     _rootWriter        = rootWriter ?? throw new ArgumentNullException(nameof(rootWriter));
     _testCaseFilter    = testCaseFilter ?? throw new ArgumentNullException(nameof(testCaseFilter));
     _suiteNameProvider = suiteNameProvider ?? throw new ArgumentNullException(nameof(suiteNameProvider));
     _idGenerator       = idGenerator ?? throw new ArgumentNullException(nameof(idGenerator));
     _options           = options;
 }
Exemplo n.º 3
0
 internal MessageHandler(
     [NotNull] ITeamCityWriter rootWriter,
     [NotNull] ITestCaseFilter testCaseFilter,
     [NotNull] ISuiteNameProvider suiteNameProvider,
     [NotNull] IOptions options,
     [NotNull] IAttachments attachments)
 {
     _rootWriter        = rootWriter ?? throw new ArgumentNullException(nameof(rootWriter));
     _testCaseFilter    = testCaseFilter ?? throw new ArgumentNullException(nameof(testCaseFilter));
     _suiteNameProvider = suiteNameProvider ?? throw new ArgumentNullException(nameof(suiteNameProvider));
     _options           = options;
     _attachments       = attachments ?? throw new ArgumentNullException(nameof(attachments));
 }
Exemplo n.º 4
0
 public TeamCityTestLogger()
 {
     _initialized = ServiceLocator.Initialize();
     if (_initialized)
     {
         _rootWriter        = ServiceLocator.GetTeamCityWriter();
         _testCaseFilter    = ServiceLocator.GetTestCaseFilter();
         _suiteNameProvider = ServiceLocator.GetSuiteNameProvider();
         if (_rootWriter == null)
         {
             throw new InvalidOperationException();
         }
         if (_testCaseFilter == null)
         {
             throw new InvalidOperationException();
         }
         if (_suiteNameProvider == null)
         {
             throw new InvalidOperationException();
         }
     }
 }