@Test public void testItems_UponUpdate_RemoveItems() { TestRowPmo row1 = new TestRowPmo(); TestRowPmo row2 = new TestRowPmo(); TestTablePmo tablePmo = new TestTablePmo(row1, row2); com.vaadin.v7.ui.Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); com.vaadin.v7.data.Container.ItemSetChangeListener itemSetChangedListener = addItemSetChangeListener(bindingContext); assertThat(table.getItemIds().size(), is(2)); tablePmo.getItems().remove(row1); bindingContext.modelChanged(); assertThat(tablePmo.getItems(), contains(row2)); assertThat(table.getItemIds(), contains(row2)); verify(itemSetChangedListener).containerItemSetChange(any()); verifyNoMoreInteractions(itemSetChangedListener); }
@SuppressWarnings("deprecation") public com.vaadin.v7.ui.Table createTable() { return (com.vaadin.v7.ui.Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { @SuppressWarnings("deprecation") public com.vaadin.v7.ui.Table createTable() { return (com.vaadin.v7.ui.Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { @SuppressWarnings("deprecation") public com.vaadin.v7.ui.Table createTable() { return (com.vaadin.v7.ui.Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { @SuppressWarnings("deprecation") public com.vaadin.v7.ui.Table createTable() { return (com.vaadin.v7.ui.Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); @SuppressWarnings("deprecation") com.vaadin.v7.ui.Table createTable(); }
PmoBasedTableFactory { @SuppressWarnings("deprecation") public com.vaadin.v7.ui.Table createTable() { return (com.vaadin.v7.ui.Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); @SuppressWarnings("deprecation") com.vaadin.v7.ui.Table createTable();  }