private async void BeUniqueByName_Create_Not_Exists()
        {
            Mock <IScrapReasonRepository> scrapReasonRepository = new Mock <IScrapReasonRepository>();

            scrapReasonRepository.Setup(x => x.ByName(It.IsAny <string>())).Returns(Task.FromResult <ScrapReason>(null));
            var validator = new ApiScrapReasonRequestModelValidator(scrapReasonRepository.Object);

            await validator.ValidateCreateAsync(new ApiScrapReasonRequestModel());

            validator.ShouldNotHaveValidationErrorFor(x => x.Name, "A");
        }
        public async void Name_Create_length()
        {
            Mock <IScrapReasonRepository> scrapReasonRepository = new Mock <IScrapReasonRepository>();

            scrapReasonRepository.Setup(x => x.Get(It.IsAny <short>())).Returns(Task.FromResult(new ScrapReason()));

            var validator = new ApiScrapReasonRequestModelValidator(scrapReasonRepository.Object);
            await validator.ValidateCreateAsync(new ApiScrapReasonRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, new string('A', 51));
        }