public void MenuItemCollection_ContainsKey_Invoke_ReturnsExpected(string key, bool expected) { var menu = new SubMenu(new MenuItem[] { new MenuItem { Name = "name" } }); var collection = new Menu.MenuItemCollection(menu); Assert.Equal(expected, collection.ContainsKey(key)); }