private void MultipleRequestClient(string serviceName, string endpoint, IMDPClient client = null) { const int _NO_OF_RUNS = 100; var reply = new NetMQMessage[_NO_OF_RUNS]; var idC01 = new[] { (byte)'C', (byte)'1' }; client = client ?? new MDPClient(endpoint, idC01); var request = new NetMQMessage(); // set the request data request.Push("Helo World!"); // send the request to the service for (int i = 0; i < _NO_OF_RUNS; i++) { reply[i] = client.Send(serviceName, request); } client.Dispose(); Assert.That(reply, Has.None.Null); Assert.That(reply.All(r => r.First.ConvertToString() == "Helo World!")); }
private void MultipleRequestClient(string serviceName, string endpoint, IMDPClient client = null) { const int _NO_OF_RUNS = 100; var reply = new NetMQMessage[_NO_OF_RUNS]; var idC01 = new[] { (byte)'C', (byte)'1' }; client = client ?? new MDPClient(endpoint, idC01); var request = new NetMQMessage(); // set the request data request.Push("Helo World!"); // send the request to the service for (int i = 0; i < _NO_OF_RUNS; i++) reply[i] = client.Send(serviceName, request); client.Dispose(); Assert.That(reply, Has.None.Null); Assert.That(reply.All(r => r.First.ConvertToString() == "Helo World!")); }