コード例 #1
0
ファイル: WelcomePageTest.cs プロジェクト: Calthurian/navbot
        public void WelcomePageWithoutTrust()
        {
            string html     = page.Render(null, null, null, emptyHeaders, emptyQuery);
            string textOnly = WebUtils.PlainText(html);

            Assert.IsTrue(textOnly.Contains("Welcome captain, it is my pleasure to serve you."), "Not a pleasure to serve me");
            Assert.IsTrue(textOnly.Contains("To do this, I need to be added to your 'trusted' list."), "No trust request");
            Assert.IsTrue(html.Contains(ConfigurationSettings.AppSettings["URLPrefix"] + "trustme"), "No trustme link");
            Assert.IsTrue(textOnly.Contains("This lets me know which system we are in, which helps me find the most profitable routes for us to take!"), "No trust explanation");
            Assert.IsTrue(html.Contains("<title>NavBot</title>"), "HTML title tag missing");
        }