Beispiel #1
0
        public void Handler_ShouldThrowException_WhenUnsubscribing_WhenSubscriptionIsNull()
        {
            //Arrange
            var handler = new Handler();
            ContextfulSubscription subscription = null;

            //Act
            //Assert
            Assert.ThrowsException <ArgumentException>(() => handler.Subscribe(subscription));
        }
Beispiel #2
0
        public void Handler_ShouldThrowException_WhenUnsubscribing_WhenEventIsNotSubscribed()
        {
            //Arrange
            var handler      = new Handler();
            var subscription = new ContextfulSubscription();

            //Act
            //Assert
            Assert.ThrowsException <ArgumentException>(() => handler.Unsubscribe(subscription));
        }