public void CanCreateLifecycleRule()
        {
            // Arrange

            // Act
            StorageService.CreateExpirationRule(_bucket, _testTemplates, 1, _testLifecycleRule);

            // Assert
            var response = S3Client.GetLifecycleConfiguration(_bucket);

            response.Configuration.Rules.Select(x => x.Id).Single().Should().NotBeNull();
        }
Exemplo n.º 2
0
        private void GetLifeCycleConfiguration()
        {
            var request = new GetLifecycleConfigurationRequest {
                BucketName = AWSBucket
            };
            var response = S3Client.GetLifecycleConfiguration(request);

            LifecycleConfiguration = response.Configuration;

            if (LifecycleConfiguration == null)
            {
                LifecycleConfiguration = new LifecycleConfiguration();
            }
        }