Exemple #1
0
        public async Task AndExpectedStartDateIsLessThanToday_ThenIsValid()
        {
            var request = new CreateApprenticeshipRequest
            {
                WageType          = WageType.CustomWageFixed,
                FixedWage         = _fixture.Create <decimal>(),
                WageUnit          = _fixture.CreateAnyWageUnitOtherThanNotApplicable(),
                ExpectedStartDate = DateTime.Today.AddDays(-1),
                HoursPerWeek      = _fixture.Create <double>()
            };
            var context = GetValidationContextForProperty(request, req => req.FixedWage);

            var result = await _validator.ValidateAsync(context).ConfigureAwait(false);

            result.IsValid.Should().Be(true);
        }