Пример #1
0
        public void TestMenuItems()
        {
            var menuItems = new[] {"Домой", "Вакансии"};

            var target = new NavController();

            var result = ((IEnumerable<MenuViewModel>) target.Menu().Model).ToArray();

            Assert.AreEqual(result.Length, 2);
            Assert.AreEqual(result[0].ItemName, menuItems[0]);
            Assert.AreEqual(result[1].ItemName, menuItems[1]);
        }
Пример #2
0
        public void CanSelectMenu()
        {
            var target = new NavController();

            var itemToSelect = "Вакансии";

            var result = ((IEnumerable<MenuViewModel>)target.Menu(itemToSelect).Model).Single(i => i.IsSelected);

            Assert.AreEqual(result.ItemName, itemToSelect);
        }