public void RedmineWikiPages_ShouldAddOrUpdatePage() { WikiPage page = redmineManager.CreateOrUpdateWikiPage("9", "Wiki", new WikiPage { Text = "Updated again and again wiki page", Comments = "I did it through code" }); Assert.IsTrue(page.Title == "Wiki"); }
public void RedmineWikiPages_ShouldAddOrUpdatePage() { WikiPage page = redmineManager.CreateOrUpdateWikiPage(projectId, wikiPageName, new WikiPage { Text = wikiPageUpdatedText, Comments = wikiPageComment }); Assert.IsTrue(page.Title == wikiPageName); }
public void Should_Add_Or_Update_WikiPage() { WikiPage page = redmineManager.CreateOrUpdateWikiPage(PROJECT_ID, WIKI_PAGE_NAME, new WikiPage { Text = WIKI_PAGE_UPDATED_TEXT, Comments = WIKI_PAGE_COMMENT }); Assert.IsNotNull(page, "Wiki page is null."); Assert.AreEqual(page.Title, WIKI_PAGE_NAME, "Wiki page name is invalid."); Assert.AreEqual(page.Text, WIKI_PAGE_UPDATED_TEXT, "Wiki page text is invalid."); Assert.AreEqual(page.Comments, WIKI_PAGE_COMMENT, "Wiki page comments are invalid."); }
/// <summary> /// Creates the or update wiki page asynchronous. /// </summary> /// <param name="redmineManager">The redmine manager.</param> /// <param name="projectId">The project identifier.</param> /// <param name="pageName">Name of the page.</param> /// <param name="wikiPage">The wiki page.</param> /// <returns></returns> public static Task <WikiPage> CreateOrUpdateWikiPageAsync(this RedmineManager redmineManager, string projectId, string pageName, WikiPage wikiPage) { return(Task.Factory.StartNew(() => redmineManager.CreateOrUpdateWikiPage(projectId, pageName, wikiPage), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default)); }
/// <summary> /// Creates the or update wiki page asynchronous. /// </summary> /// <param name="redmineManager">The redmine manager.</param> /// <param name="projectId">The project identifier.</param> /// <param name="pageName">Name of the page.</param> /// <param name="wikiPage">The wiki page.</param> /// <returns></returns> public static Task <WikiPage> CreateOrUpdateWikiPageAsync(this RedmineManager redmineManager, string projectId, string pageName, WikiPage wikiPage) { return(delegate { return redmineManager.CreateOrUpdateWikiPage(projectId, pageName, wikiPage); }); }
/// <summary> /// Creates the or update wiki page asynchronous. /// </summary> /// <param name="redmineManager">The redmine manager.</param> /// <param name="projectId">The project identifier.</param> /// <param name="pageName">Name of the page.</param> /// <param name="wikiPage">The wiki page.</param> /// <returns></returns> public static Task <WikiPage> CreateOrUpdateWikiPageAsync(this RedmineManager redmineManager, string projectId, string pageName, WikiPage wikiPage) { return(Task.Factory.StartNew(() => redmineManager.CreateOrUpdateWikiPage(projectId, pageName, wikiPage), TaskCreationOptions.LongRunning)); }