Example #1
0
        public void Should_Get_All_Wiki_Pages_By_Project_Id()
        {
            List <WikiPage> pages = (List <WikiPage>)redmineManager.GetAllWikiPages(PROJECT_ID);

            Assert.IsNotNull(pages, "Wiki pages list is null.");
            CollectionAssert.AllItemsAreNotNull(pages, "Wiki pages list contains null elements.");
            CollectionAssert.AllItemsAreUnique(pages, "Wiki pages are not unique.");
            CollectionAssert.AllItemsAreInstancesOfType(pages, typeof(WikiPage), "Not all pages are of type WikiPage.");
            Assert.IsTrue(pages.Count == NUMBER_OF_WIKI_PAGES, "Wiki pages count != " + NUMBER_OF_WIKI_PAGES);
            Assert.IsTrue(pages.Exists(p => p.Title == WIKI_PAGE_NAME), string.Format("Wiki page {0} does not exist", WIKI_PAGE_NAME));
        }
Example #2
0
 /// <summary>
 /// Gets all wiki pages asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <returns></returns>
 public static Task <List <WikiPage> > GetAllWikiPagesAsync(this RedmineManager redmineManager, string projectId)
 {
     return(Task.Factory.StartNew(() => redmineManager.GetAllWikiPages(projectId), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default));
 }
 /// <summary>
 /// Gets all wiki pages asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <returns></returns>
 public static Task <IList <WikiPage> > GetAllWikiPagesAsync(this RedmineManager redmineManager, string projectId)
 {
     return(delegate { return redmineManager.GetAllWikiPages(projectId); });
 }
        public void RedmineWikiPages_ShouldGetAllPages()
        {
            List <WikiPage> pages = (List <WikiPage>)redmineManager.GetAllWikiPages("9");

            Assert.IsTrue(pages.Count == 1 && pages[0].Title.Equals("Wiki"));
        }
Example #5
0
 /// <summary>
 /// Gets all wiki pages asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <returns></returns>
 public static Task <IList <WikiPage> > GetAllWikiPagesAsync(this RedmineManager redmineManager,
                                                             NameValueCollection parameters, string projectId)
 {
     return(delegate { return redmineManager.GetAllWikiPages(projectId); });
 }
Example #6
0
        public void RedmineWikiPages_ShouldGetAllPages()
        {
            List <WikiPage> pages = (List <WikiPage>)redmineManager.GetAllWikiPages(projectId);

            Assert.IsTrue(pages.Count == noOfWikiPages && pages[0].Title.Equals(wikiPageName));
        }
Example #7
0
 /// <summary>
 /// Gets all wiki pages asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="projectId">The project identifier.</param>
 /// <returns></returns>
 public static Task <List <WikiPage> > GetAllWikiPagesAsync(this RedmineManager redmineManager, string projectId)
 {
     return(Task.Factory.StartNew(() => redmineManager.GetAllWikiPages(projectId), TaskCreationOptions.LongRunning));
 }
Example #8
0
 GetAllWikiPagesAsync(this RedmineManager redmineManager,
                      System.Collections.Specialized.NameValueCollection parameters
                      , string projectId)
 {
     return(delegate { return redmineManager.GetAllWikiPages(projectId); });
 }