@Test
public void shouldOpenContextMenuBelowPlaylists() {
ListView<Playlist> listView = getListView();
ListCell<Playlist> listCell = cellFactory.call(listView);
listCell.updateListView(listView);
listCell.updateIndex(10);
listCell.onContextMenuRequestedProperty().get().handle(getContextMenuEvent(listCell));
MenuItem newPlaylistItem = listCell.getContextMenu().getItems().get(0);
MenuItem deletePlaylistItem = listCell.getContextMenu().getItems().get(1);
assertThat("New playlist item should not be disabled", newPlaylistItem.isDisable(), equalTo(false));
assertThat("Delete playlist item should be disabled", deletePlaylistItem.isDisable(), equalTo(true));
}
PlaylistListCellFactoryTest.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:rpmjukebox
作者:
评论列表
文章目录