コード例 #1
0
 @Before
 public void setUp() {
   shell = displayHelper.createShell();
   timeline = stubTimeline();
   itemUiMap = stubUiItemMap();
   itemUiList = stubUiItemList(shell);
   updater =
       spy(new SwtTopItemUpdater<>(timeline, itemUiMap, itemUiList, directUiThreadDispatcher()));
 }
コード例 #2
0
  @Test
  public void updateIfItemUiControlIsNotShowing() throws Exception {
    Item item = equipWithItems(timeline, new Item("id", 20L) {});
    SwtItemUi<Item> itemUi = stubItemUi(displayHelper.createShell());
    map(itemUiMap, item, itemUi);
    getItemUiControl(item).setLocation(0, fromTopOffset(1));

    updater.update();

    verify(timeline, never()).setTopItem(item);
  }