Exemple #1
0
        public void when_purging_a_public_container_wit_multiple_purge_email_addresses()
        {
            var deleteContainer = new DeleteContainer("http://cdnmanagementurl", "containername", new[] { "*****@*****.**", "*****@*****.**" });
            var mockrequest     = new Mock <ICloudFilesRequest>();
            var webheaders      = new WebHeaderCollection();

            mockrequest.SetupGet(x => x.Headers).Returns(webheaders);

            Assert.That(deleteContainer.CreateUri().ToString(), Is.EqualTo("http://cdnmanagementurl/containername"));

            deleteContainer.Apply(mockrequest.Object);

            mockrequest.VerifySet(x => x.Method = "DELETE");
            webheaders.KeyValueFor(Constants.X_PURGE_EMAIL).HasValueOf("[email protected],[email protected]");
        }
 public void Should_have_url_made_of_storage_url_and_container_name()
 {
     Assert.AreEqual("http://storageurl/containername", deleteContainer.CreateUri().ToString());
 }