Exemplo n.º 1
0
 public void CreateInstanceShouldThrowExceptinIfInstanceMessageSinkIsNull()
 {
     Assert.ThrowsException <ArgumentNullException>(() =>
     {
         DataCollectionRequestHandler.CreateInstance(this.mockCommunicationManager.Object, null);
     });
 }
Exemplo n.º 2
0
        private static void Run()
        {
            var requestHandler = DataCollectionRequestHandler.CreateInstance(new SocketCommunicationManager(), new MessageSink());

            requestHandler.InitializeCommunication(port);

            // Wait for the connection to the sender and start processing requests from sender
            if (requestHandler.WaitForRequestSenderConnection(ClientListenTimeOut))
            {
                requestHandler.ProcessRequests();
            }
            else
            {
                EqtTrace.Info("DataCollector: RequestHandler timed out while connecting to the Sender.");
                requestHandler.Close();
                throw new TimeoutException();
            }
        }
Exemplo n.º 3
0
        public void CreateInstanceShouldCreateInstance()
        {
            var result = DataCollectionRequestHandler.CreateInstance(this.mockCommunicationManager.Object, this.mockMessageSink.Object);

            Assert.AreEqual(result, DataCollectionRequestHandler.Instance);
        }