public void RedmineWikiPages_ShouldCompare() { WikiPage page = redmineManager.GetWikiPage(projectId, new NameValueCollection { { "include", "attachments" } }, wikiPageName); WikiPage pageToCompare = redmineManager.GetWikiPage(projectId, new NameValueCollection { { "include", "attachments" } }, wikiPageName); Assert.IsTrue(page.Equals(pageToCompare)); }
public void Should_Compare_Wiki_Pages() { WikiPage page = redmineManager.GetWikiPage(PROJECT_ID, new NameValueCollection { { RedmineKeys.INCLUDE, RedmineKeys.ATTACHMENTS } }, WIKI_PAGE_NAME); WikiPage pageToCompare = redmineManager.GetWikiPage(PROJECT_ID, new NameValueCollection { { RedmineKeys.INCLUDE, RedmineKeys.ATTACHMENTS } }, WIKI_PAGE_NAME); Assert.IsNotNull(page, "Wiki page is null."); Assert.IsTrue(page.Equals(pageToCompare), "Wiki pages are not equal."); }
private void LoadWikiPage() { if (!IsFile) { wikiViewFile.Visible = false; wikiEditFile.Visible = false; if (WikiPage.Equals(string.Empty) || !Action.Equals(Action.View)) { if (!Action.Equals(Action.View)) { wikiEditPage.Visible = true; } wikiViewPage.Visible = false; if (Action.Equals(Action.Edit)) { wikiEditPage.PageName = WikiPage; } else { wikiEditPage.PageName = string.Empty; } Title = string.Format("WIKI - Edit/Add page"); } else { wikiViewPage.Visible = true; wikiEditPage.Visible = false; wikiViewPage.PageName = WikiPage; Title = string.Format("WIKI - {0}", PageNameUtil.Decode(WikiPage)); } } else { wikiViewPage.Visible = false; wikiEditPage.Visible = false; if (WikiPage.Equals(string.Empty) || !Action.Equals(Action.View)) { if (!Action.Equals(Action.View)) { wikiEditFile.Visible = true; } wikiViewFile.Visible = false; if (Action.Equals(Action.Edit)) { wikiEditFile.FileName = WikiPage; } else { wikiEditFile.FileName = string.Empty; } Title = string.Format("WIKI - Edit/Add file"); } else { wikiViewFile.Visible = true; wikiEditFile.Visible = false; cmdEditFile.Visible = true; wikiViewFile.FileName = WikiPage; Title = string.Format("WIKI - {0}", PageNameUtil.Decode(WikiPage)); } } }