public void CreateShouldThrowExceptionIfMessageLoggerIsNull() { Assert.ThrowsException <ArgumentNullException>(() => { var dataCollectionExtensionManager = DataCollectorExtensionManager.Create(null); }); }
/// <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>(); }
public void CreateShouldReturnInstanceOfDataCollectorExtensionManager() { try { var dataCollectorExtensionManager = DataCollectorExtensionManager.Create(TestSessionMessageLogger.Instance); Assert.IsNotNull(dataCollectorExtensionManager); Assert.IsInstanceOfType(dataCollectorExtensionManager, typeof(DataCollectorExtensionManager)); } finally { TestSessionMessageLogger.Instance = null; } }