Ejemplo n.º 1
0
        public void Should_return_page_by_name_with_no_deleted_page_modules()
        {
            using (var context = new WeapsyDbContext(_contextOptions))
            {
                var repository = new PageRepository(Shared.CreateNewContextFactory(context), Shared.CreateNewMapper());
                var page       = repository.GetByName(_siteId, "Name 1");

                Assert.AreEqual(0, page.PageModules.Count(x => x.Status == PageModuleStatus.Deleted));
            }
        }
Ejemplo n.º 2
0
        public void Should_return_page_by_name()
        {
            using (var context = new WeapsyDbContext(_contextOptions))
            {
                var repository = new PageRepository(Shared.CreateNewContextFactory(context), Shared.CreateNewMapper());
                var page       = repository.GetByName(_siteId, "Name 1");

                Assert.NotNull(page);
            }
        }