public void Teardown()
 {
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
 }
Beispiel #2
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "acquire_a_lease", "file", false);
     _client.Create(Container, "acquire_a_lease_on_a_file_that_is_already_leased", "file", false);
     _client.Create(Container, "acquire_a_lease_to_be_broken", "file", false);
     _client.Create(Container, "expired_lease_to_be_broken", "file", false);
     _client.Create(Container, "break_a_lease_twice", "file", false);
     _client.Create(Container, "nonexistent_lease", "file", false);
     _client.Create(Container, "change_a_lease", "file", false);
     _client.Create(Container, "change_an_expired_lease", "file", false);
     _client.Create(Container, "change_a_nonexistent_lease", "file", false);
     _client.Create(Container, "renew_a_lease", "file", false);
     _client.Create(Container, "renew_an_expired_lease", "file", false);
     _client.Create(Container, "renew_a_nonexistent_lease", "file", false);
     _client.Create(Container, "renew_broken_lease", "file", false);
     _client.Create(Container, "release_a_lease", "file", false);
     _client.Create(Container, "release_an_expired_lease", "file", false);
     _client.Create(Container, "release_a_nonexistent_lease", "file", false);
 }
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "get_properties", "file", false);
 }
Beispiel #4
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("TenantId"), Configuration.Value("ClientId"), Configuration.Value("ClientSecret"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("TenantId"), Configuration.Value("ClientId"), Configuration.Value("ClientSecret")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "list_test_with_oauth", "directory", false);
 }
Beispiel #5
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "existent_file", "file", false);
     _client.Create(Container, "existent_directory", "directory", false);
     _client.Create(Container, "file_to_overwrite", "file", false);
     _client.Create(Container, "directory_to_overwrite", "directory", false);
 }
Beispiel #6
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "list_test", "directory", false);
     _client.Create(Container, "list_test/list_test_branch_a", "directory", false);
     _client.Create(Container, "list_test/list_test_branch_a/list_test_branch_a_sub_a", "directory", false);
     _client.Create(Container, "list_test/list_test_branch_b", "directory", false);
 }
Beispiel #7
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "small_read_file", "file", false);
     _client.Update(Container, "small_read_file", "append", Enumerable.Range(0, 998).Select(x => (byte)(x % 255)).ToArray());
     _client.Update(Container, "small_read_file", "flush", position: 998);
     _client.Create(Container, "large_read_file", "file", false);
     _client.Update(Container, "large_read_file", "append", Enumerable.Range(0, 2405342).Select(x => (byte)(x % 255)).ToArray());
     _client.Update(Container, "large_read_file", "flush", position: 2405342);
 }
Beispiel #8
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "file_to_upload_to", "file", false);
     _client.Create(Container, "file_to_flush_to", "file", false);
     _client.Create(Container, "file_to_append_and_flush_to", "file", false);
     _client.Create(Container, "file_greater_than_4mb", "file", false);
     _client.Create(Container, "file_to_append_and_flush_to_out_of_order", "file", false);
     _client.Create(Container, "verify_content", "file", false);
     _client.Create(Container, "invalid_flush", "file", false);
 }
Beispiel #9
0
 public void Setup()
 {
     _client = Adlg2ClientFactory.BuildPathClient(Configuration.Value("Account"), Configuration.Value("Key"));
     Adlg2ClientFactory.BuildFilesystemClient(Configuration.Value("Account"), Configuration.Value("Key")).Create(Container);
     foreach (var path in _client.List(Container))
     {
         _client.Delete(Container, path.Name, true);
     }
     _client.Create(Container, "existent_file", "file", false);
     _client.Create(Container, "existent_directory", "directory", false);
     _client.Create(Container, "recursive_directory", "directory", false);
     _client.Create(Container, "recursive_directory/level1", "directory", false);
     _client.Create(Container, "recursive_directory_to_fail_to_delete", "directory", false);
     _client.Create(Container, "recursive_directory_to_fail_to_delete/level1", "directory", false);
     _client.Create(Container, "big_directory", "directory", false);
     Parallel.For(0, 5001, x => _client.Create(Container, $"big_directory/{x}", "file", false));
 }
Beispiel #10
0
 public void delete_a_file_that_exists()
 {
     Assert.IsTrue(_client.Delete(Container, "existent_file", false));
 }