Ejemplo n.º 1
0
        public void test_delete_object()
        {
            _headers.Add("request-type", "object");
            ObjectResponse res = _client.DeleteObject("", "", "", "", _headers, new Dictionary <string, string>());

            Assert.True(res.Reason == "foo");
            Assert.True(res.Status == 201);
        }
Ejemplo n.º 2
0
 public void teardown()
 {
     teardown_query["prefix"] = prefix;
     try
     {
         foreach (var container_info in client.GetAccount(storage_url, auth_token, new Dictionary <string, string>(), teardown_query, false).Containers)
         {
             foreach (var object_info in client.GetContainer(storage_url, auth_token, container_info["name"], new Dictionary <string, string>(), new Dictionary <string, string>(), false).Objects)
             {
                 client.DeleteObject(storage_url, auth_token, container_info["name"],
                                     container_info.ContainsKey("name") ? object_info["name"] : object_info["subdir"],
                                     new Dictionary <string, string>(), new Dictionary <string, string>());
             }
             client.DeleteContainer(storage_url, auth_token, container_info["name"], new Dictionary <string, string>(), new Dictionary <string, string>());
         }
     }
     catch (ClientException)
     {
     }
 }