Ejemplo n.º 1
0
        public void test_head_account()
        {
            _headers.Add("request-type", "account");
            AccountResponse res = _client.HeadAccount("", "", _headers, new Dictionary <string, string>());

            Assert.True(res.Headers.ContainsKey("x-account-container-count"));
            Assert.True(res.Headers["x-account-container-count"] == "1");
            Assert.True(res.Headers.ContainsKey("x-account-object-count"));
            Assert.True(res.Headers["x-account-object-count"] == "1");
            Assert.True(res.Headers.ContainsKey("x-account-meta-foo"));
            Assert.True(res.Headers["x-account-meta-foo"] == "foo");
            Assert.True(res.Headers.ContainsKey("x-account-bytes-used"));
            Assert.True(res.Headers["x-account-bytes-used"] == "1");
            Assert.True(res.Reason == "foo");
            Assert.True(res.Status == 201);
        }
Ejemplo n.º 2
0
        public void test_head_account()
        {
            AccountResponse res = client.HeadAccount(storage_url, auth_token, new Dictionary <string, string>(), new Dictionary <string, string>());

            Assert.IsTrue(res.Status > 199 && res.Status < 300);
            foreach (string header in account_headers)
            {
                Assert.IsTrue(res.Headers.ContainsKey(header));
            }
            res = client.HeadAccount(storage_url, auth_token, new Dictionary <string, string>(), new Dictionary <string, string>());
            Assert.IsTrue(res.Status > 199 && res.Status < 300);
            foreach (string header in account_headers)
            {
                Assert.IsTrue(res.Headers.ContainsKey(header));
            }
        }