" <g:MenuBar wbp:name='bar'>",
" <g:MenuItem wbp:name='item_1' text='A'>",
" <g:MenuBar wbp:name='subMenu_1'>",
" <g:MenuItem wbp:name='item_2' text='B'>",
" <g:MenuBar wbp:name='subMenu_2'>");
MenuBarInfo bar = getObjectByName("bar");
MenuItemInfo item_1 = getObjectByName("item_1");
MenuItemInfo item_2 = getObjectByName("item_2");
// can not move "bar" on "subMenu_1"
{
MenuBarInfo subMenu_1 = item_1.getSubMenu();
IMenuInfo subMenuObject_1 = MenuObjectInfoUtils.getMenuInfo(subMenu_1);
assertFalse(subMenuObject_1.getPolicy().validateMove(bar));
}
// move "item_2" before "item_1"
{