public void CreateExpirationRule_Ok()
        {
            // Arrange

            // Act
            StorageService.CreateExpirationRule("files", "throwAway", 1, "Files I don't care about");

            // Assert
            S3ClientMock.Verify(x => x.PutLifecycleConfiguration("files", It.Is <LifecycleConfiguration>(conf =>
                                                                                                         conf.Rules.Single().Id == "Files I don't care about")));
        }
        public void UploadFile_Ok()
        {
            // Arrange
            const string bucket = "files";
            const string key    = "tax_return.pdf";

            // Act
            string result = StorageService.UploadFile(bucket, key, new byte[] { 1, 2, 3 });

            // Assert
            S3ClientMock.Verify(x => x.PutObject(It.Is <PutObjectRequest>(req =>
                                                                          req.BucketName == bucket &&
                                                                          req.Key == key &&
                                                                          req.ServerSideEncryptionMethod == ServerSideEncryptionMethod.AES256
                                                                          )));
            result.Should().Be("http://s3.amazonaws.com/files/tax_return.pdf");
        }