Пример #1
0
        //[ExpectedException(typeof(ArgumentNullException))]
        public void Unsubscribe_NullSubscriptionObject_Throws()
        {
            var messenger = UtilityMethods.GetMessenger();

            AssertHelper.ThrowsException<ArgumentNullException>(() => messenger.Unsubscribe<TestMessage>(null));
        }
Пример #2
0
 //[ExpectedException(typeof(ArgumentNullException))]
 public void CancellableGenericTinyMessage_PublishWithNullAction_Throws()
 {
     var messenger = UtilityMethods.GetMessenger();
     AssertHelper.ThrowsException<ArgumentNullException>(() => messenger.Publish<CancellableGenericTinyMessage<string>>(new CancellableGenericTinyMessage<string>(this, "Testing", null)));
 }
Пример #3
0
        //[ExpectedException(typeof(ArgumentNullException))]
        public void Subscribe_NullProxy_Throws()
        {
            var messenger = UtilityMethods.GetMessenger();

            AssertHelper.ThrowsException<ArgumentNullException>(() => messenger.Subscribe<TestMessage>(new Action<TestMessage>(UtilityMethods.FakeDeliveryAction<TestMessage>), new Func<TestMessage, bool>(UtilityMethods.FakeMessageFilter<TestMessage>), null));
        }
Пример #4
0
        //[ExpectedException(typeof(ArgumentNullException))]
        public void Publish_NullMessage_Throws()
        {
            var messenger = UtilityMethods.GetMessenger();

            AssertHelper.ThrowsException<ArgumentNullException>(() => messenger.Publish<TestMessage>(null));
        }