public async Task ping_happy_path_with_tcp() { using (var runtime = JasperHost.For(_ => { _.Endpoints.ListenAtPort(2222); })) { var sender = new BatchedSender("tcp://localhost:2222".ToUri(), new SocketSenderProtocol(), CancellationToken.None, TransportLogger.Empty()); sender.RegisterCallback(new StubSenderCallback()); await sender.Ping(CancellationToken.None); } }
public BatchedSenderTests() { theSender = new BatchedSender(TransportConstants.RepliesUri, theProtocol, theCancellation.Token, TransportLogger.Empty()); theSender.RegisterCallback(theSenderCallback); theBatch = new OutgoingMessageBatch(theSender.Destination, new[] { Envelope.ForPing(TransportConstants.LocalUri), Envelope.ForPing(TransportConstants.LocalUri), Envelope.ForPing(TransportConstants.LocalUri), Envelope.ForPing(TransportConstants.LocalUri), Envelope.ForPing(TransportConstants.LocalUri), Envelope.ForPing(TransportConstants.LocalUri) }); theBatch.Messages.Each(x => x.Destination = theBatch.Destination); }