コード例 #1
0
 public async Task ThrowsExceptionGivenNullEventArgument()
 {
     Exception ex = await Assert.ThrowsAsync <ArgumentNullException>(() => _handler.Handle(null));
 }
        public void DoesNothingGivenEventInstance()
        {
            var handler = new ItemCompletedEmailNotificationHandler();

            handler.Handle(new ToDoItemCompletedEvent(new ToDoItem()));
        }
        public async Task ThrowsExceptionGivenNullEventArgument()
        {
            var handler = new ItemCompletedEmailNotificationHandler();

            Exception ex = await Assert.ThrowsAsync <ArgumentNullException>(() => handler.Handle(null));
        }
        public void ThrowsExceptionGivenNullEventArgument()
        {
            var handler = new ItemCompletedEmailNotificationHandler();

            Exception ex = Assert.Throws <ArgumentNullException>(() => handler.Handle(null));
        }
コード例 #5
0
        public async Task DoesNothingGivenEventInstance()
        {
            var handler = new ItemCompletedEmailNotificationHandler();

            await handler.Handle(new TodoItemCompletedEvent(new TodoItem()));
        }