public void TestCreateContainerFailTimeout() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "fail-timeout"; Assert.Throws <TimeoutException>(() => account.CreateContainer("foo")); }
public void TestCreateContainerFailUnauthorized() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "fail-unauthorized"; Assert.Throws <UnauthorizedException>(() => account.CreateContainer("foo")); }
public void TestCreateContainer() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "put-container"; Assert.AreSame(account.CreateContainer("foo").GetType(), typeof(CF_Container)); }
public void TestCreateContainerFail() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "fail"; Assert.Throws <CloudFilesException>(() => account.CreateContainer("foo")); }
private void CheckContainer() { var account = new CF_Account(_conn, _client); var list = account.GetContainers(new Dictionary<ContainerQuery, string> { { ContainerQuery.Prefix, ContainerName } }); if (!list.Any(e => e.Name.Equals(ContainerName))) { if (!RackspaceIsCreateContainerIfNotFound) { throw new ApplicationException(String.Format("Container not found [{0}]", ContainerName)); } account.CreateContainer(ContainerName); } _container = new CF_Container(_conn, _client, ContainerName); }
/// <summary> /// Create a container /// </summary> /// <param name="containerName">Name of Container</param> public void CreateContainer(string containerName) { _account.CreateContainer(containerName); }
public void TestCreateContainerArgNull() { var account = new CF_Account(_conn, _client); Assert.Throws <ArgumentNullException>(() => account.CreateContainer(null)); }
private void CreateContainer() { var account = new CF_Account(_connection); _container = account.CreateContainer(_container.Name); }
public void TestCreateContainerFailUnauthorized() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "fail-unauthorized"; Assert.Throws<UnauthorizedException>(() => account.CreateContainer("foo")); }
public void TestCreateContainerFailTimeout() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "fail-timeout"; Assert.Throws<TimeoutException>(() => account.CreateContainer("foo")); }
public void TestCreateContainerFail() { var account = new CF_Account(_conn, _client); _conn.UserCreds.AuthToken = "fail"; Assert.Throws<CloudFilesException>(() => account.CreateContainer("foo")); }
public void TestCreateContainerArgNull() { var account = new CF_Account(_conn, _client); Assert.Throws<ArgumentNullException>(() => account.CreateContainer(null)); }