public void WaitForRequestHandlerConnectionShouldWaitForConnectionToBeCompleted() { this.mockCommunicationManager.Setup(x => x.WaitForClientConnection(It.IsAny <int>())).Returns(true); var result = requestHandler.WaitForRequestHandlerConnection(10); Assert.IsTrue(result); }
public void WaitForRequestHandlerConnectionShouldThrowExceptionIfThrownByConnectionManager() { this.mockCommunicationManager.Setup(x => x.WaitForClientConnection(It.IsAny <int>())).Throws <Exception>(); var requestHandler = new DataCollectionTestCaseEventHandler(this.mockCommunicationManager.Object); Assert.ThrowsException <Exception>(() => { requestHandler.WaitForRequestHandlerConnection(10); }); }