private async void BeUniqueByName_Update_Exists()
        {
            Mock <IWorkerPoolRepository> workerPoolRepository = new Mock <IWorkerPoolRepository>();

            workerPoolRepository.Setup(x => x.ByName(It.IsAny <string>())).Returns(Task.FromResult <WorkerPool>(new WorkerPool()));
            var validator = new ApiWorkerPoolRequestModelValidator(workerPoolRepository.Object);

            await validator.ValidateUpdateAsync(default(string), new ApiWorkerPoolRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, "A");
        }
        public async void Name_Update_length()
        {
            Mock <IWorkerPoolRepository> workerPoolRepository = new Mock <IWorkerPoolRepository>();

            workerPoolRepository.Setup(x => x.Get(It.IsAny <string>())).Returns(Task.FromResult(new WorkerPool()));

            var validator = new ApiWorkerPoolRequestModelValidator(workerPoolRepository.Object);
            await validator.ValidateUpdateAsync(default(string), new ApiWorkerPoolRequestModel());

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