Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }