public void MyTestInitialize() { //Setting up the inbound handler with all the references connectionUri = new MockAdapterConnectionUri(new Uri("mock://localhost/TestEndpoint")); adapter = new MockAdapter(); adapter.Encoding = "UTF-8"; MockAdapterConnectionFactory connectionFactory = new MockAdapterConnectionFactory( connectionUri, null, adapter); MockAdapterConnection connection = new MockAdapterConnection(connectionFactory); outboundHandler = new MockAdapterOutboundHandler(connection, null); }
public void MyTestInitialize() { //Setting up the inbound handler with all the references connectionUri = new MockAdapterConnectionUri( new Uri( string.Format("mock://localhost/2WayTestEndpoint{0}", endpointId++)) ); adapter = new MockAdapter(); adapter.Encoding = "UTF-8"; MockAdapterConnectionFactory connectionFactory = new MockAdapterConnectionFactory( connectionUri, null, adapter); MockAdapterConnection connection = new MockAdapterConnection(connectionFactory); inboundHandler = new MockAdapterInboundHandler(connection, null); inboundHandler.StartListener(null, TimeSpan.FromMinutes(1)); }
private void InitInboundHandler(string address, string adapterProperties) { connectionUri = new MockAdapterConnectionUri(new Uri(address)); adapter = new MockAdapter(); adapter.Encoding = "UTF-8"; if (!string.IsNullOrEmpty(adapterProperties)) { adapter.PromotedProperties = adapterProperties; } MockAdapterConnectionFactory connectionFactory = new MockAdapterConnectionFactory( connectionUri, null, adapter); MockAdapterConnection connection = new MockAdapterConnection(connectionFactory); inboundHandler = new MockAdapterInboundHandler(connection, null); }
public void MyTestInitialize() { // Setting up the inbound handler with all the references // Setting differnet URL for each test in order to avoid collisions // over the same pipe due to lagging clean up as it is usually // executed in the context of a different thread connectionUri = new MockAdapterConnectionUri( new Uri( string.Format("mock://localhost/TestEndpoint{0}", endpointId++)) ); adapter = new MockAdapter(); adapter.Encoding = "UTF-8"; MockAdapterConnectionFactory connectionFactory = new MockAdapterConnectionFactory( connectionUri, null, adapter); MockAdapterConnection connection = new MockAdapterConnection(connectionFactory); outboundHandler = new MockAdapterOutboundHandler(connection, null); }