public void when_deleting_a_container()
 {
     var deleteContainer = new DeleteContainer("http://storageurl", "containername");
     var mockrequest = new Mock<ICloudFilesRequest>();
     deleteContainer.Apply(mockrequest.Object);
     should("have url made of storage url and container name",
         ()=>deleteContainer.CreateUri().ToString().Is("http://storageurl/containername"));
     should("have http delete method", ()=>
         mockrequest.VerifySet(x => x.Method = "DELETE")
         );
 }
        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]");
        }
 protected override void SetUp()
 {
     deleteContainer = new DeleteContainer("http://storageurl", "containername");
     mockrequest = new Mock<ICloudFilesRequest>();
     deleteContainer.Apply(mockrequest.Object);
 }