public void GetNavItems_no_processer_should_return_all() { var memoryNavItemRepository = new MemoryNavItemRepository(); var navItems = memoryNavItemRepository.Items; var navItemService = new NavItemService(memoryNavItemRepository, null); var items = navItemService.GetNavItems(new GetNavItemsArgs()); items.Count(x => !x.Hidden).ShouldEqual(navItems.Count); }
public void GetNavItems_with_processer_should_return_ok() { var memoryNavItemRepository = new MemoryNavItemRepository(); var navItems = memoryNavItemRepository.Items; var navItemService = new NavItemService(memoryNavItemRepository, new List <INavItemFilter>() { new MockNavItemFilter() }); var items = navItemService.GetNavItems(new GetNavItemsArgs()); items.Count(x => !x.Hidden).ShouldEqual(navItems.Count - 1); }