public void Should_return_created_status_when_the_container_does_not_exist() { CreateContainer createContainer = new CreateContainer(storageUrl, Constants.CONTAINER_NAME); IResponse response = new GenerateRequestByType( ).Submit(createContainer, authToken); Assert.That(response.Status, Is.EqualTo(HttpStatusCode.Created)); DeleteContainer(storageUrl, Constants.CONTAINER_NAME); }
private void PutContainer(string storageUri, String containerName) { var createContainer = new CreateContainer(storageUri, containerName); IResponse response = new GenerateRequestByType().Submit(createContainer, authToken); Assert.That(response.Status, Is.EqualTo(HttpStatusCode.Created)); }
private void ContainerCreation(string containerName, Dictionary<string, string> metadata) { var createContainer = new CreateContainer(StorageUrl, containerName, metadata); var createContainerResponse = _requestfactory.Submit(createContainer, AuthToken); if (createContainerResponse.Status == HttpStatusCode.Accepted) throw new ContainerAlreadyExistsException("The container already exists"); }
protected override void SetupContext() { createContainer = new CreateContainer("http://storageurl", "containername"); mock = new Mock<ICloudFilesRequest>(); createContainer.Apply(mock.Object); }
private void CreateContainer() { var createContainer = new CreateContainer(storageUrl, containerName); var putContainerResponse = new GenerateRequestByType().Submit(createContainer, authToken); Assert.That(putContainerResponse.Status, Is.EqualTo(HttpStatusCode.Created)); }