public void Should_get_404_when_item_does_not_existt()
 {
     using (new TestHelper(authToken, storageUrl))
     {
         var getStorageItemInformation = new GetStorageItemInformation(storageUrl, Constants.CONTAINER_NAME, Constants.StorageItemName);
         try
         {
             new GenerateRequestByType().Submit(getStorageItemInformation, authToken);
         }
         catch (Exception ex)
         {
             Assert.That(ex, Is.TypeOf(typeof(WebException)));
         }
     }
 }
        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 setup()
 {
     getStorageItemInformation = new GetStorageItemInformation("http://storageurl", "containername", "storageitemname");
 }