public void RedmineWikiPages_ShouldReturnWikiPage()
        {
            WikiPage page = redmineManager.GetWikiPage("9", new NameValueCollection {
                { "include", "attachments" }
            }, "Wiki");

            Assert.IsTrue(page.Title == "Wiki");
        }
Esempio n. 2
0
 /// <summary>
 /// Gets the wiki page asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="pageName">Name of the page.</param>
 /// <param name="version">The version.</param>
 /// <returns></returns>
 public static Task <WikiPage> GetWikiPageAsync(this RedmineManager redmineManager
                                                , string projectId,
                                                System.Collections.Specialized.NameValueCollection parameters
                                                , string pageName
                                                , uint version = 0)
 {
     return(delegate { return redmineManager.GetWikiPage(projectId, parameters, pageName, version); });
 }
Esempio n. 3
0
        public void Should_Get_Wiki_Page_By_Title()
        {
            WikiPage page = redmineManager.GetWikiPage(PROJECT_ID, null, WIKI_PAGE_NAME);

            Assert.IsNotNull(page, "Wiki page is null.");
            Assert.AreEqual(page.Title, WIKI_PAGE_NAME, "Wiki page name is invalid.");
        }
Esempio n. 4
0
 /// <summary>
 /// Gets the wiki page asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="pageName">Name of the page.</param>
 /// <param name="version">The version.</param>
 /// <returns></returns>
 public static Task <WikiPage> GetWikiPageAsync(this RedmineManager redmineManager, string projectId, NameValueCollection parameters, string pageName, uint version = 0)
 {
     return(Task.Factory.StartNew(() => redmineManager.GetWikiPage(projectId, parameters, pageName, version), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default));
 }
Esempio n. 5
0
 /// <summary>
 /// Gets the wiki page asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="pageName">Name of the page.</param>
 /// <param name="version">The version.</param>
 /// <returns></returns>
 public static Task <WikiPage> GetWikiPageAsync(this RedmineManager redmineManager, string projectId, NameValueCollection parameters, string pageName, uint version = 0)
 {
     return(Task.Factory.StartNew(() => redmineManager.GetWikiPage(projectId, parameters, pageName, version), TaskCreationOptions.LongRunning));
 }