Пример #1
0
        public void RemoveListLandingContent()
        {
            //assemble
            var content = new ListLandingContent {
                Id = "DeleteMe", Title = "To be deleted"
            };

            s_repo.CreateContentAsync(content).GetAwaiter().GetResult();

            var controller = new ManageListController(s_repo, s_mapRepo);

            //act
            var result      = controller.Delete("DeleteMe", content);
            var items       = s_repo.GetListOfItemsAsync(ContentType.ListLanding.ToString()).GetAwaiter().GetResult();
            var missingItem = items.Where((i) => i.Id == "DeleteMe").FirstOrDefault();

            //assert
            Assert.IsNull(missingItem, "Item should not be found in repository");
        }