@Test public void onStopEditingItem() { elementPresenter.onStopEditingItem(elementView1Mock); verify(propertyPresenterMock, times(1)).stopEditProperties(eq(ELEMENT1_ID + "#key")); verify(propertyPresenterMock, times(1)).stopEditProperties(eq(ELEMENT1_ID + "#value")); verify(styleMock, times(1)).setDisplay(Style.Display.NONE); verify(collectionPresenterMock, times(1)).toggleEditingStatus(eq(false)); }
@Override public void onStopEditingItem(KeyValueElementView keyValueElementView) { List<String> keyValueIds = getKeyValueIds( keyValueElementView.getItemId()); keyValueIds.forEach(id -> propertyPresenter.stopEditProperties(id)); keyValueElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); toggleEditingStatus(false); collectionEditorPresenter.toggleEditingStatus(false); }
KeyValueElementPresenter extends ElementPresenter<KeyValueElementView> implements KeyValueElementView.Presenter { @Override public void onStopEditingItem(KeyValueElementView keyValueElementView) { List<String> keyValueIds = getKeyValueIds( keyValueElementView.getItemId()); keyValueIds.forEach(id -> propertyPresenter.stopEditProperties(id)); keyValueElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); toggleEditingStatus(false); collectionEditorPresenter.toggleEditingStatus(false); } }
KeyValueElementPresenter extends ElementPresenter<KeyValueElementView> implements KeyValueElementView.Presenter { @Override public void onStopEditingItem(KeyValueElementView keyValueElementView) { List<String> keyValueIds = getKeyValueIds( keyValueElementView.getItemId()); keyValueIds.forEach(id -> propertyPresenter.stopEditProperties(id)); keyValueElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); toggleEditingStatus(false); collectionEditorPresenter.toggleEditingStatus(false); }  }
KeyValueElementPresenter extends ElementPresenter<KeyValueElementView> implements KeyValueElementView.Presenter { @Override public void onStopEditingItem(KeyValueElementView keyValueElementView) { List<String> keyValueIds = getKeyValueIds( keyValueElementView.getItemId()); keyValueIds.forEach(id -> propertyPresenter.stopEditProperties(id)); keyValueElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); toggleEditingStatus(false); collectionEditorPresenter.toggleEditingStatus(false); }  @Override LIElement getKeyValueContainer(String itemId, Map<String, String> keyPropertiesValues, Map<String, String> valuePropertiesValues); @Override void onToggleRowExpansion(KeyValueElementView keyValueElementView, boolean isShown); @Override void onEditItem(KeyValueElementView keyValueElementView); @Override void onStopEditingItem(KeyValueElementView keyValueElementView); @Override void onDeleteItem(KeyValueElementView keyValueElementView); @Override void updateItem(KeyValueElementView keyValueElementView); @Override Map<Map<String, String>, Map<String, String>> getItemsProperties(); }
KeyValueElementPresenter extends ElementPresenter<KeyValueElementView> implements KeyValueElementView.Presenter { @Override public void onStopEditingItem(KeyValueElementView keyValueElementView) { List<String> keyValueIds = getKeyValueIds( keyValueElementView.getItemId()); keyValueIds.forEach(id -> propertyPresenter.stopEditProperties(id)); keyValueElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); toggleEditingStatus(false); collectionEditorPresenter.toggleEditingStatus(false); }  @Override LIElement getKeyValueContainer(String itemId, Map<String, String> keyPropertiesValues, Map<String, String> valuePropertiesValues); @Override void onToggleRowExpansion(KeyValueElementView keyValueElementView, boolean isShown); @Override void onEditItem(KeyValueElementView keyValueElementView); @Override void onStopEditingItem(KeyValueElementView keyValueElementView); @Override void onDeleteItem(KeyValueElementView keyValueElementView); @Override void updateItem(KeyValueElementView keyValueElementView); @Override Map<Map<String, String>, Map<String, String>> getItemsProperties();  }