Contains() public method

public Contains ( MenuItem value ) : bool
value MenuItem
return bool
Beispiel #1
0
        public void MenuItemCollection_Contains_IListNotMenuItem_ReturnsMinusOne()
        {
            var   menu       = new SubMenu(new MenuItem[0]);
            IList collection = new Menu.MenuItemCollection(menu);

            Assert.False(collection.Contains("value"));
        }
Beispiel #2
0
        public void MenuItemCollection_Contains_IListInvoke_ReturnsExpected(Menu menu, MenuItem value, bool expected)
        {
            IList collection = new Menu.MenuItemCollection(menu);

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