protected override void OnInit() { listener.AfterPropertiesSet(); if (!listenerContainer.Active) { listenerContainer.AfterPropertiesSet(); } }
public void DefaultHeaderMappingMessageConverter() { ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener(); listener.AfterPropertiesSet(); HeaderMappingMessageConverter hmmc = GetHmmc(listener); Assert.That(hmmc, Is.Not.Null); SimpleMessageConverter smc = hmmc.GetType().GetField("converter", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(hmmc) as SimpleMessageConverter; Assert.That(smc, Is.Not.Null); }
public void CustomMessageConverterDecoratedForHeaderMapping() { ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener(); IMessageConverter originalConverter = new TestMessageConverter(); listener.MessageConverter = originalConverter; listener.AfterPropertiesSet(); HeaderMappingMessageConverter hmmc = GetHmmc(listener); Assert.That(hmmc, Is.Not.Null); TestMessageConverter smc = hmmc.GetType().GetField("converter", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(hmmc) as TestMessageConverter; Assert.That(smc, Is.Not.Null); }
public void DefaultHeaderMappingMessageConverter() { ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener(); listener.AfterPropertiesSet(); HeaderMappingMessageConverter hmmc = GetHmmc(listener); Assert.That(hmmc, Is.Not.Null); SimpleMessageConverter smc = hmmc.GetType().GetField("converter", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(hmmc) as SimpleMessageConverter; Assert.That(smc, Is.Not.Null); }
public void NoReplyToAndNoDefault() { QueueChannel requestChannel = new QueueChannel(); StartBackgroundReplier(requestChannel); ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener(); listener.ExpectReply = true; listener.RequestChannel = requestChannel; listener.MessageConverter = new TestMessageConverter(); Apache.NMS.IMessage nmsMessage = session.CreateTextMessage("test"); listener.AfterPropertiesSet(); listener.OnMessage(nmsMessage, session); }
public void CustomMessageConverterDecoratedForHeaderMapping() { ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener(); IMessageConverter originalConverter = new TestMessageConverter(); listener.MessageConverter = originalConverter; listener.AfterPropertiesSet(); HeaderMappingMessageConverter hmmc = GetHmmc(listener); Assert.That(hmmc, Is.Not.Null); TestMessageConverter smc = hmmc.GetType().GetField("converter", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(hmmc) as TestMessageConverter; Assert.That(smc, Is.Not.Null); }
public void NoReplyToAndNoDefault() { QueueChannel requestChannel = new QueueChannel(); StartBackgroundReplier(requestChannel); ChannelPublishingJmsMessageListener listener = new ChannelPublishingJmsMessageListener(); listener.ExpectReply = true; listener.RequestChannel = requestChannel; listener.MessageConverter = new TestMessageConverter(); Apache.NMS.IMessage nmsMessage = session.CreateTextMessage("test"); listener.AfterPropertiesSet(); listener.OnMessage(nmsMessage, session); }