public DataCollectionRequestHandlerTests() { this.mockCommunicationManager = new Mock <ICommunicationManager>(); this.mockMessageSink = new Mock <IMessageSink>(); this.mockDataCollectionManager = new Mock <IDataCollectionManager>(); this.mockDataCollectionTestCaseEventHandler = new Mock <IDataCollectionTestCaseEventHandler>(); this.mockDataCollectionTestCaseEventHandler.Setup(x => x.WaitForRequestHandlerConnection(It.IsAny <int>())).Returns(true); this.requestHandler = new TestableDataCollectionRequestHandler(this.mockCommunicationManager.Object, this.mockMessageSink.Object, this.mockDataCollectionManager.Object, this.mockDataCollectionTestCaseEventHandler.Object); }
public DataCollectionRequestHandlerTests() { this.mockCommunicationManager = new Mock <ICommunicationManager>(); this.mockMessageSink = new Mock <IMessageSink>(); this.mockDataCollectionManager = new Mock <IDataCollectionManager>(); this.mockDataSerializer = new Mock <IDataSerializer>(); this.mockDataCollectionTestCaseEventHandler = new Mock <IDataCollectionTestCaseEventHandler>(); this.mockDataCollectionTestCaseEventHandler.Setup(x => x.WaitForRequestHandlerConnection(It.IsAny <int>())).Returns(true); this.requestHandler = new TestableDataCollectionRequestHandler(this.mockCommunicationManager.Object, this.mockMessageSink.Object, this.mockDataCollectionManager.Object, this.mockDataCollectionTestCaseEventHandler.Object, this.mockDataSerializer.Object); this.mockCommunicationManager.SetupSequence(x => x.ReceiveMessage()).Returns(this.beforeTestRunStart).Returns(this.afterTestRunEnd); this.mockDataCollectionManager.Setup(x => x.SessionStarted(It.IsAny <SessionStartEventArgs>())).Returns(true); }