public void BookingDate_FromDate_DefaultDate_ArgumentNullException()
        {
            //Arrange
            var dte = DateTime.MinValue;

            //Act & Assert
            Assert.Throws <ArgumentNullException>(() => BookingDate.FromDate(dte));
        }
        protected async override Task <AccountRoot> Apply(ChangePaymentCommand command, CancellationToken cancellationToken)
        {
            AggregateRoot.ChangeBooking(
                Domain.BookingId.FromGuid(command.BookingId),
                Payment.FromDecimal(command.AccountItemDto.Amount, AggregateRoot.Currency.Value),
                BookingDate.FromDate(command.AccountItemDto.Date),
                Description.FromString(command.AccountItemDto.Description));

            return(await Task.FromResult(AggregateRoot));
        }
        public void BookingDate_FromDate_ValidDate_Created()
        {
            //Arrange
            var dte = DateTime.Parse("2020-09-26");

            //Act
            var bookingDate = BookingDate.FromDate(dte);

            //Assert
            Assert.AreEqual(dte, bookingDate.Value);
        }