public void Should_get_200_OK_or_204_No_Content_when_item_exists()
        {
            using (var testHelper = new TestHelper(authToken, storageUrl))
            {
                try
                {
                    testHelper.PutItemInContainer(Constants.HeadStorageItemName);
                    testHelper.AddMetadataToItem(Constants.HeadStorageItemName);

                    var getStorageItemInformation = new GetStorageItemInformation(storageUrl, Constants.CONTAINER_NAME, Constants.HeadStorageItemName);
                    var getStorageItemInformationResponse = new GenerateRequestByType().Submit(
                        getStorageItemInformation, authToken);
                    Assert.That(getStorageItemInformationResponse.Status == HttpStatusCode.OK
                        || getStorageItemInformationResponse.Status == HttpStatusCode.NoContent, Is.True);

                    var metadata = getStorageItemInformationResponse.Metadata;
                    Assert.That(metadata["Test"], Is.EqualTo("test"));
                    Assert.That(metadata["Test2"], Is.EqualTo("test2"));
                }
                finally
                {
                    testHelper.DeleteItemFromContainer(Constants.HeadStorageItemName);
                }
            }
        }
        public void Should_get_204_No_Content_when_item_exists()
        {
            using (TestHelper testHelper = new TestHelper(authToken, storageUrl))
            {
                try
                {
                    testHelper.PutItemInContainer(Constants.HeadStorageItemName);
                    testHelper.AddMetadataToItem(Constants.HeadStorageItemName);

                    var getStorageItemInformation = new GetStorageItemInformation(storageUrl, authToken, Constants.CONTAINER_NAME, Constants.HeadStorageItemName);
                    var getStorageItemInformationResponse = new ResponseFactory<CloudFilesResponse>().Create(new CloudFilesRequest(getStorageItemInformation));
                    Assert.That(getStorageItemInformationResponse.Status, Is.EqualTo(HttpStatusCode.NoContent));

                    var metadata = getStorageItemInformationResponse.Metadata;
                    Assert.That(metadata["Test"], Is.EqualTo("test"));
                    Assert.That(metadata["Test2"], Is.EqualTo("test2"));
                }
                finally
                {
                    testHelper.DeleteItemFromContainer(Constants.HeadStorageItemName);
                }
            }
        }
        public void Should_get_200_OK_or_204_No_Content_when_item_exists()
        {
            using (var testHelper = new TestHelper(authToken, storageUrl))
            {
                try
                {
                    testHelper.PutItemInContainer(Constants.HeadStorageItemName);
                    testHelper.AddMetadataToItem(Constants.HeadStorageItemName);

                    var getStorageItemInformation         = new GetStorageItemInformation(storageUrl, Constants.CONTAINER_NAME, Constants.HeadStorageItemName);
                    var getStorageItemInformationResponse = new GenerateRequestByType().Submit(
                        getStorageItemInformation, authToken);
                    Assert.That(getStorageItemInformationResponse.Status == HttpStatusCode.OK || getStorageItemInformationResponse.Status == HttpStatusCode.NoContent, Is.True);

                    var metadata = getStorageItemInformationResponse.Metadata;
                    Assert.That(metadata["Test"], Is.EqualTo("test"));
                    Assert.That(metadata["Test2"], Is.EqualTo("test2"));
                }
                finally
                {
                    testHelper.DeleteItemFromContainer(Constants.HeadStorageItemName);
                }
            }
        }