Пример #1
0
 public void SetUp()
 {
     _publish = new PublishFiles(ClientFactory, RequestTimoutMilliseconds, BufferSizeKilobytes, true, LoggerMock)
     {
         SourceFiles       = EnumerateFiles(SourceFolder),
         Bucket            = Bucket,
         DestinationFolder = DestinationFolder
     };
 }
Пример #2
0
        public void TearDown()
        {
            var removeBucket = new DeleteBucket(ClientFactory, RequestTimoutMilliseconds, BufferSizeKilobytes, LoggerMock)
            {
                Bucket = Bucket
            };

            Assert.IsTrue(removeBucket.Execute(), "Could not remove test bucket!");

            if (_publish != null)
            {
                _publish.Dispose();
            }
            _publish = null;
        }
Пример #3
0
        public void SetUp()
        {
            var publish = new PublishFiles(ClientFactory, RequestTimoutMilliseconds, BufferSizeKilobytes, true, LoggerMock)
            {
                SourceFiles       = new ITaskItem[] { new TaskItem(TestFilePath) },
                Bucket            = Bucket,
                DestinationFolder = DestinationFolder
            };

            Assert.IsTrue(publish.Execute());

            _delete = new DeleteChildren(ClientFactory, RequestTimoutMilliseconds, BufferSizeKilobytes, LoggerMock)
            {
                Bucket   = Bucket,
                Children = new[] { string.Format("{0}/{1}", DestinationFolder, TestFileName) }
            };
        }
Пример #4
0
        public void SetUp()
        {
            var publish = new PublishFiles(ClientFactory, RequestTimoutMilliseconds, true, LoggerMock)
                            {
                                SourceFiles = new[] {TestFilePath},
                                Bucket = Bucket,
                                DestinationFolder = DestinationFolder
                            };

            Assert.IsTrue(publish.Execute());

            _delete = new DeleteChildren(ClientFactory, RequestTimoutMilliseconds, LoggerMock)
                        {
                            Bucket = Bucket,
                            Children = new[] { string.Format("{0}/{1}", DestinationFolder, TestFileName) }
                        };
        }