public void MenuItemCollection_CopyTo_Empty_Nop() { var menu = new SubMenu(new MenuItem[0]); var collection = new Menu.MenuItemCollection(menu); var array = new object[] { 1, 2, 3 }; collection.CopyTo(array, 1); Assert.Equal(new object[] { 1, 2, 3 }, array); }
public void MenuItemCollection_CopyTo_NotEmpty_Success() { var menuItem = new MenuItem(); var menu = new SubMenu(new MenuItem[0]); var collection = new Menu.MenuItemCollection(menu); collection.Add(menuItem); var array = new object[] { 1, 2, 3 }; collection.CopyTo(array, 1); Assert.Equal(new object[] { 1, menuItem, 3 }, array); }