public void SetGameEndedMenuTest() { List<MenuDialog> dialogList = new List<MenuDialog>(); for (int i = 0; i <= 10; i += 1) { MenuItem menuItem = new MenuItem(delegate(MenuItem m) { }, null); MenuItem[] menuItems = { menuItem }; MenuDialog d = new MenuDialog(menuItems); d.Active = (i == 3) ? true : false; dialogList.Add(d); } MenuModel target = new MenuModel(); target.MenuDialogs = dialogList.ToArray(); target.SetGameEndedMenu(2); Assert.IsFalse(dialogList[3].Active); Assert.IsTrue(dialogList[10].Active); Assert.AreEqual(2, target.WinningPlayerID); }