示例#1
0
        public void CanHandleCommand()
        {
            // Arrange
            var command = new DonationReceivedCommand
            {
                Name           = "Test User",
                PostCode       = "AB12CD",
                DonationAmount = 2.0m
            };

            var commandHandler = new DonationReceivedCommandHandler(new DonationInMemoryRepository());

            // Act
            AsyncTestDelegate act = async() => await commandHandler.HandleAsync(command);

            // Assert
            Assert.DoesNotThrowAsync(act);
        }
 public GiftAidController(GetGiftAidQuery getGiftAidQuery, DonationReceivedCommandHandler donationReceivedCommandHandler)
 {
     _getGiftAidQuery = getGiftAidQuery;
     _donationReceivedCommandHandler = donationReceivedCommandHandler;
 }