Exemple #1
0
        public async Task AndWageUnitIsNotApplicable_ThenIsValid()
        {
            var request = new CreateApprenticeshipRequest
            {
                WageType          = WageType.CustomWageFixed,
                FixedWage         = _fixture.Create <decimal>(),
                WageUnit          = WageUnit.NotApplicable,
                ExpectedStartDate = _fixture.CreateFutureDateTime(),
                HoursPerWeek      = _fixture.Create <double>()
            };
            var context = GetValidationContextForProperty(request, req => req.FixedWage);

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

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