Esempio n. 1
0
 public void CreateShouldThrowExceptionIfMessageLoggerIsNull()
 {
     Assert.ThrowsException <ArgumentNullException>(() =>
     {
         var dataCollectionExtensionManager = DataCollectorExtensionManager.Create(null);
     });
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataCollectionManager"/> class.
 /// </summary>
 /// <param name="datacollectionAttachmentManager">
 /// The datacollection Attachment Manager.
 /// </param>
 /// <param name="messageSink">
 /// The message Sink.
 /// </param>
 /// <remarks>
 /// The constructor is not public because the factory method should be used to get instances of this class.
 /// </remarks>
 protected DataCollectionManager(IDataCollectionAttachmentManager datacollectionAttachmentManager, IMessageSink messageSink)
 {
     this.attachmentManager             = datacollectionAttachmentManager;
     this.messageSink                   = messageSink;
     this.events                        = new TestPlatformDataCollectionEvents();
     this.dataCollectorExtensionManager = null;
     this.RunDataCollectors             = new Dictionary <Type, DataCollectorInformation>();
 }
Esempio n. 3
0
 public void CreateShouldReturnInstanceOfDataCollectorExtensionManager()
 {
     try
     {
         var dataCollectorExtensionManager = DataCollectorExtensionManager.Create(TestSessionMessageLogger.Instance);
         Assert.IsNotNull(dataCollectorExtensionManager);
         Assert.IsInstanceOfType(dataCollectorExtensionManager, typeof(DataCollectorExtensionManager));
     }
     finally
     {
         TestSessionMessageLogger.Instance = null;
     }
 }