public void TestGetContainer()
        {
            var account = new CF_Account(_conn, _client);

            _conn.UserCreds.AuthToken = "head-container";
            Assert.AreSame(account.GetContainer("foo").GetType(), typeof(CF_Container));
        }
        public void TestGetContainerFailUnauthorized()
        {
            var account = new CF_Account(_conn, _client);

            _conn.UserCreds.AuthToken = "fail-unauthorized";
            Assert.Throws <UnauthorizedException>(() => account.GetContainer("foo"));
        }
        public void TestGetContainerFailTimeout()
        {
            var account = new CF_Account(_conn, _client);

            _conn.UserCreds.AuthToken = "fail-timeout";
            Assert.Throws <TimeoutException>(() => account.GetContainer("foo"));
        }
        public void TestGetContainerFailNotFound()
        {
            var account = new CF_Account(_conn, _client);

            _conn.UserCreds.AuthToken = "fail-not-found";
            Assert.Throws <ContainerNotFoundException>(() => account.GetContainer("foo"));
        }
        public void TestGetContainerFail()
        {
            var account = new CF_Account(_conn, _client);

            _conn.UserCreds.AuthToken = "fail";
            var ex = Assert.Throws <CloudFilesException>(() => account.GetContainer("foo"));

            Assert.That(ex.Message, Is.EqualTo("Error: 500"));
        }
        public void TestGetContainerArgNull()
        {
            var account = new CF_Account(_conn, _client);

            Assert.Throws <ArgumentNullException>(() => account.GetContainer(null));
        }
 public void TestGetContainerFailUnauthorized()
 {
     var account = new CF_Account(_conn, _client);
     _conn.UserCreds.AuthToken = "fail-unauthorized";
     Assert.Throws<UnauthorizedException>(() => account.GetContainer("foo"));
 }
 public void TestGetContainerFailTimeout()
 {
     var account = new CF_Account(_conn, _client);
     _conn.UserCreds.AuthToken = "fail-timeout";
     Assert.Throws<TimeoutException>(() => account.GetContainer("foo"));
 }
 public void TestGetContainerFailNotFound()
 {
     var account = new CF_Account(_conn, _client);
     _conn.UserCreds.AuthToken = "fail-not-found";
     Assert.Throws<ContainerNotFoundException>(() => account.GetContainer("foo"));
 }
 public void TestGetContainerFail()
 {
     var account = new CF_Account(_conn, _client);
     _conn.UserCreds.AuthToken = "fail";
     var ex = Assert.Throws<CloudFilesException>(() => account.GetContainer("foo"));
     Assert.That(ex.Message, Is.EqualTo("Error: 500"));
 }
 public void TestGetContainerArgNull()
 {
     var account = new CF_Account(_conn, _client);
     Assert.Throws<ArgumentNullException>(() => account.GetContainer(null));
 }
 public void TestGetContainer()
 {
     var account = new CF_Account(_conn, _client);
     _conn.UserCreds.AuthToken = "head-container";
     Assert.AreSame(account.GetContainer("foo").GetType(), typeof(CF_Container));
 }