public async Task ExceptionThrownWhenCreatingaStorageContainerHasInternalServerError() { var containerName = "TestContainer"; var containerReq = new StorageContainer(containerName, new Dictionary<string, string>()); var restResp = new HttpResponseAbstraction(new MemoryStream(), new HttpHeadersAbstraction(), HttpStatusCode.InternalServerError); this.StorageServiceRestClient.Responses.Enqueue(restResp); var client = new StorageServicePocoClient(GetValidContext(), this.ServiceLocator); await client.CreateStorageContainer(containerReq); }
public async Task CanCreateStorageContainerWithNoContentResponse() { var containerName = "TestContainer"; var headers = new HttpHeadersAbstraction { {"X-Container-Bytes-Used", "12345"}, {"X-Container-Object-Count", "1"} }; var restResp = new HttpResponseAbstraction(new MemoryStream(), headers, HttpStatusCode.NoContent); this.StorageServiceRestClient.Responses.Enqueue(restResp); var containerReq = new StorageContainer(containerName, new Dictionary<string, string>()); var client = new StorageServicePocoClient(GetValidContext(), this.ServiceLocator); await client.CreateStorageContainer(containerReq); //Assert.IsNotNull(container); //Assert.AreEqual(containerName, container.Name); //Assert.AreEqual(12345, container.TotalBytesUsed); }