public async void Description_Update_length()
        {
            Mock <IFileRepository> fileRepository = new Mock <IFileRepository>();

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

            var validator = new ApiFileServerRequestModelValidator(fileRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiFileServerRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Description, new string('A', 256));
        }
        public async void PublicKey_Update_null()
        {
            Mock <IFileRepository> fileRepository = new Mock <IFileRepository>();

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

            var validator = new ApiFileServerRequestModelValidator(fileRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiFileServerRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.PublicKey, null as string);
        }
        public async void BucketId_Update_Valid_Reference()
        {
            Mock <IFileRepository> fileRepository = new Mock <IFileRepository>();

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

            var validator = new ApiFileServerRequestModelValidator(fileRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiFileServerRequestModel());

            validator.ShouldNotHaveValidationErrorFor(x => x.BucketId, 1);
        }
        public async void FileTypeId_Update_Invalid_Reference()
        {
            Mock <IFileRepository> fileRepository = new Mock <IFileRepository>();

            fileRepository.Setup(x => x.FileTypeByFileTypeId(It.IsAny <int>())).Returns(Task.FromResult <FileType>(null));

            var validator = new ApiFileServerRequestModelValidator(fileRepository.Object);

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

            validator.ShouldHaveValidationErrorFor(x => x.FileTypeId, 1);
        }