コード例 #1
0
 public void WhenPublishExtensionWithNullBusEmptyMessageAndHeaders_ThenThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           MessageBusExtensions.Publish(default(IMessageBus <FooMessage>),
                                                                        Enumerable.Empty <FooMessage>(),
                                                                        new Dictionary <string, object>()));
 }
コード例 #2
0
 public void WhenPublishExtensionWithNullHeadersAndEmptyMessages_ThenThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           MessageBusExtensions.Publish(
                                               Mock.Of <IMessageBus <FooMessage> >(),
                                               Enumerable.Empty <FooMessage>(),
                                               default(IDictionary <string, object>)));
 }
コード例 #3
0
 public void WhenPublishExtensionOnNullBus_ThenThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           MessageBusExtensions.Publish(null, new FooMessage()));
 }
コード例 #4
0
 public void WhenPublishExtensionWithNullMessages_ThenThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           MessageBusExtensions.Publish(Mock.Of <IMessageBus <FooMessage> >(), default(IEnumerable <FooMessage>)));
 }
コード例 #5
0
 public void WhenPublishExtensionOnNullBusEmptyMessages_ThenThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           MessageBusExtensions.Publish <FooMessage>(null, Enumerable.Empty <FooMessage>()));
 }