Exemplo n.º 1
0
        public void test_put_container()
        {
            _headers.Add("request-type", "container");
            ContainerResponse res = _client.PutContainer("", "", "", _headers, new Dictionary <string, string>());

            Assert.True(res.Reason == "foo");
            Assert.True(res.Status == 201);
        }
Exemplo n.º 2
0
        public void test_get_account()
        {
            created_containers.Add((prefix + Guid.NewGuid().ToString()));
            created_containers.Add((prefix + Guid.NewGuid().ToString()));
            foreach (string container_name in created_containers)
            {
                client.PutContainer(storage_url, auth_token, container_name, new Dictionary <string, string>(), new Dictionary <string, string>());
            }
            var query = new Dictionary <string, string>();

            query["prefix"] = prefix;
            var res = client.GetAccount(storage_url, auth_token, new Dictionary <string, string>(), query, true);

            foreach (var container_dictionary in res.Containers)
            {
                foreach (var key in container_listing_keys)
                {
                    Assert.IsTrue(container_dictionary.ContainsKey(key));
                }
            }
            foreach (var header in account_headers)
            {
                Assert.IsTrue(res.Headers.ContainsKey(header));
            }
        }