Example #1
0
        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);
            }
        }
Example #2
0
        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);
        }