Пример #1
0
        public void ModifyPageOk()
        {
            PagesOperationServiceMockService mock = new PagesOperationServiceMockService();
            Page page = new Page()
            {
                PageID = mock.GetPages().FirstOrDefault().PageID,
                Route  = "/modify/route"
            };
            bool added = mock.LoadPage(page, false);

            Assert.True(mock.GetPage(page.Route) != null);
        }
Пример #2
0
        public void AddPageFalse()
        {
            PagesOperationServiceMockService mock = new PagesOperationServiceMockService();
            int  countOld = mock.GetPages().Count;
            Page pageNew  = new Page()
            {
                Content = "<p>hola</p>",
                Route   = "/pages/page1.html",
                PageID  = Guid.NewGuid()
            };
            bool added = mock.LoadPage(pageNew, true);

            Assert.True(mock.GetPages().Count == countOld && !added);
        }