public async Task Then_Will_Return_Error_Messages_If_Course_Is_A_Framework()
        {
            //Arrange
            var request = new ValidateReservationQuery
            {
                CourseCode    = CourseId,
                ReservationId = ReservationId,
                StartDate     = _reservation.StartDate.Value
            };

            var course = new Course("12-34", "Test Course", "1", DateTime.Today);

            _courseService.Setup(s => s.GetCourseById(It.IsAny <string>())).ReturnsAsync(course);

            //Act
            var result = await _handler.Handle(request, CancellationToken.None);

            //Assert
            var error = result?.Errors.FirstOrDefault();

            Assert.IsNotNull(error);
            Assert.AreEqual(nameof(ValidateReservationQuery.CourseCode), error.PropertyName);
            Assert.AreEqual("Select an apprenticeship training course standard", error.Reason);
        }
        public void Arrange()
        {
            var startDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);

            _course = new Course(CourseId, "Test Course", "1", DateTime.Today);

            _courseService = new Mock <ICourseService>();
            _courseService.Setup(s => s.GetCourseById(It.IsAny <string>()))
            .ReturnsAsync(_course);

            _reservation = new Reservation(time => Task.FromResult(new List <Rule>() as IList <Rule>), ReservationId, 1, false, DateTime.Now, startDate, startDate.AddMonths(3), ReservationStatus.Pending, new Domain.Entities.Course(), 1, 1, "Legal Entity", 0, null);

            _reservationService = new Mock <IAccountReservationService>();
            _reservationService
            .Setup(r => r.GetReservation(It.IsAny <Guid>()))
            .ReturnsAsync(_reservation);

            _validator = new Mock <IValidator <ValidateReservationQuery> >();

            _validator.Setup(v => v.ValidateAsync(It.IsAny <ValidateReservationQuery>()))
            .ReturnsAsync(new ValidationResult());

            _handler = new ValidateReservationQueryHandler(_reservationService.Object, _courseService.Object, _validator.Object);
        }