public async void Name_Update_length()
        {
            Mock <IBucketRepository> bucketRepository = new Mock <IBucketRepository>();

            bucketRepository.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult(new Bucket()));

            var validator = new ApiBucketRequestModelValidator(bucketRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiBucketRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, new string('A', 256));
        }
        private async void BeUniqueByExternalId_Update_Exists()
        {
            Mock <IBucketRepository> bucketRepository = new Mock <IBucketRepository>();

            bucketRepository.Setup(x => x.ByExternalId(It.IsAny <Guid>())).Returns(Task.FromResult <Bucket>(new Bucket()));
            var validator = new ApiBucketRequestModelValidator(bucketRepository.Object);

            await validator.ValidateUpdateAsync(default(int), new ApiBucketRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.ExternalId, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }
        public async void Name_Create_null()
        {
            Mock <IBucketRepository> bucketRepository = new Mock <IBucketRepository>();

            bucketRepository.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult(new Bucket()));

            var validator = new ApiBucketRequestModelValidator(bucketRepository.Object);
            await validator.ValidateCreateAsync(new ApiBucketRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, null as string);
        }