Exemplo n.º 1
0
        public void PublishPage()
        {
            Updaterepo.PublishPage(4);

            var newpage = Readrepo.GetAllPageSummaries();

            Assert.AreEqual(true, newpage.Where(m => m.StaticPageID == 4).FirstOrDefault(x => x.IsPublished == true).IsPublished);
        }
Exemplo n.º 2
0
        public void AddStaticPage()
        {
            StaticPage newpage = new StaticPage();

            newpage.ButtonName = "Koshin Test Page";
            newpage.UserID     = "b75da91b-e39a-42ce-b2f0-4834eda139e1";
            newpage.Body       = "Test page body";


            var result = Createrepo.AddStaticPage(newpage);
            var pages  = Readrepo.GetAllPageSummaries();
            var page   = pages.FirstOrDefault(p => p.StaticPageID == result);


            Assert.AreEqual(page.StaticPageID, result);
        }
Exemplo n.º 3
0
        public void GetAllPageSummaries()
        {
            List <StaticPage> pages = Readrepo.GetAllPageSummaries();

            Assert.AreEqual(1, pages.FirstOrDefault(m => m.StaticPageID == 1).StaticPageID);
        }