public void CleanUp() { var operations = new ContentOperations <DocumentLibraries>(); DocumentLibraries library = new DocumentLibraries(); library.ID = libraryId; if (operations.GetItem(library).StatusCode == HttpStatusCode.OK) { operations.Delete(library); } }
public void CreateDocumentLibrary() { var libraryTitle = TestContentPrefix + Guid.NewGuid().ToString(); DocumentLibraries library = new DocumentLibraries(); library.Title = libraryTitle.ToString(); var operations = new ContentOperations <DocumentLibraries>(); var response = operations.CreateDraft(library); Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); var results = JsonConvert.DeserializeObject <dynamic>(response.Content); libraryId = results.Id; Assert.IsNotNull(libraryId); }