IndexOf() public method

public IndexOf ( MenuItem value ) : int
value MenuItem
return int
Example #1
0
        public void MenuItemCollection_IndexOf_IListNotMenuItem_ReturnsMinusOne()
        {
            var   menu       = new SubMenu(new MenuItem[0]);
            IList collection = new Menu.MenuItemCollection(menu);

            Assert.Equal(-1, collection.IndexOf("value"));
        }
Example #2
0
        public void MenuItemCollection_IndexOf_IListInvoke_ReturnsExpected(Menu menu, MenuItem value, int expected)
        {
            IList collection = new Menu.MenuItemCollection(menu);

            Assert.Equal(expected, collection.IndexOf(value));
        }