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");
        }
Ejemplo n.º 2
0
        public void RedmineWikiPages_ShouldAddOrUpdatePage()
        {
            WikiPage page = redmineManager.CreateOrUpdateWikiPage(projectId, wikiPageName, new WikiPage {
                Text = wikiPageUpdatedText, Comments = wikiPageComment
            });

            Assert.IsTrue(page.Title == wikiPageName);
        }
Ejemplo n.º 3
0
        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.");
        }
Ejemplo n.º 4
0
 /// <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));
 }
Ejemplo n.º 5
0
 /// <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); });
 }
Ejemplo n.º 6
0
 /// <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));
 }