public async void Name_Update_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.ValidateUpdateAsync(default(short), new ApiScrapReasonRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, new string('A', 51));
        }
        private async void BeUniqueByName_Update_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.ValidateUpdateAsync(default(short), new ApiScrapReasonRequestModel());

            validator.ShouldNotHaveValidationErrorFor(x => x.Name, "A");
        }