Example #1
0
        public void DeleteNonExistingPublicContainerReturnsHttpAccepted()
        {
            bs.DeleteContainer(containername);
            BlobStorageResponse response = bs.DeleteContainer(containername);

            Assert.AreEqual(HttpStatusCode.Accepted, response.HttpResponse.status);
        }
Example #2
0
        public static bool CompletedIfContainerIsGone(BlobStorageResponse response, object o)
        {
            if (response == null)
            {
                return(false);
            }
            string container;

            try
            {
                container = (String)o;
            }
            catch (Exception e)
            {
                GenUtils.PriorityLogMsg("exception", "CompletedIfContainerIsGone", e.Message + e.StackTrace);
                throw new Exception("CompletedObjectDelegateException");
            }

            if (!ExistsContainer(container))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #3
0
        public void CreateExistingPublicContainerIsConflict()
        {
            bs.DeleteContainer(containername);
            bs.CreateContainer(containername, true, new Hashtable());
            BlobStorageResponse response = bs.CreateContainer(containername, true, new Hashtable());

            Assert.That(response != null);
            Assert.AreEqual(System.Net.HttpStatusCode.Conflict, response.HttpResponse.status);
        }
Example #4
0
        public static bool CompletedIfContainerIsNotBeingDeleted(BlobStorageResponse response, Object o)
        {
            if (response == null)
            {
                return(false);
            }
            var xml_response = response.HttpResponse.DataAsString();

            if (xml_response.Contains("ContainerBeingDeleted"))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Example #5
0
        public static bool CompletedIfContainerIsGone(BlobStorageResponse response, object o)
        {
            if (response == null)
                return false;
            string container;
            try
            {
                container = (String)o;
            }
            catch (Exception e)
            {
                GenUtils.PriorityLogMsg("exception", "CompletedIfContainerIsGone", e.Message + e.StackTrace);
                throw new Exception("CompletedObjectDelegateException");
            }

            if (!ExistsContainer(container))
                return true;
            else
                return false;
        }
Example #6
0
 public static bool CompletedIfContainerIsNotBeingDeleted(BlobStorageResponse response, Object o)
 {
     if (response == null)
         return false;
     var xml_response = response.HttpResponse.DataAsString();
     if (xml_response.Contains("ContainerBeingDeleted"))
         return false;
     else
         return true;
 }