Пример #1
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);
 }
Пример #2
0
 public void upload_data_to_file()
 {
     Assert.IsTrue(_client.Update(Container, "file_to_upload_to", "append", new byte[] { 1, 2, 3, 4 }));
 }