public void when_adding_storage_object() { var createContainer = new PutStorageDirectory("http://storageurl", "containername", "objname"); var mock = new Mock<ICloudFilesRequest>(); createContainer.Apply(mock.Object); should("append container and object name to storage url", () => createContainer.CreateUri().ToString().Is("http://storageurl/containername/objname")); should("use PUT method", () => mock.VerifySet(x => x.Method = "PUT") ); should("have content type of application/directory", () => mock.VerifySet(x => x.ContentType = "application/directory") ); should("set content with basic empty object", () => mock.Verify(x => x.SetContent(It.IsAny<MemoryStream>(), It.IsAny<Connection.ProgressCallback>())) ); }
public void SetUp() { createContainer = new PutStorageDirectory("http://storageurl", "containername", "objname"); mock = new Mock<ICloudFilesRequest>(); createContainer.Apply(mock.Object); }