public void GatewayWithContainerReference() { XmlApplicationContext ctx = (XmlApplicationContext)NmsTestUtils.GetContext(@"Nms\Config\InboundGatewayWithContainerReference.xml"); NmsMessageDrivenEndpoint gateway = (NmsMessageDrivenEndpoint)ctx.GetObject("gatewayWithContainerReference"); gateway.Start(); object cc = TestUtils.GetFieldValue(TestUtils.GetFieldValue(gateway, "listenerContainer"), "concurrentConsumers"); Assert.That(cc, Is.EqualTo(1)); //default value of concurrent consumers. gateway.Stop(); }
public void GatewayWithConcurrentConsumers() { XmlApplicationContext ctx = (XmlApplicationContext)NmsTestUtils.GetContext(@"Nms\Config\NmsGatewayWithContainerSettings.xml"); NmsMessageDrivenEndpoint gateway = (NmsMessageDrivenEndpoint)ctx.GetObject("gatewayWithConcurrentConsumers"); gateway.Start(); object cc = TestUtils.GetFieldValue(TestUtils.GetFieldValue(gateway, "listenerContainer"), "concurrentConsumers"); Assert.That(cc, Is.EqualTo(3)); gateway.Stop(); }