@Test public void addListItem() { collectionEditorPresenterSpy.addListItem(propertyMapLocal, new HashMap<>()); verify(collectionViewMock, times(1)).getElementsContainer(); verify(elementsContainerMock, times(1)).getChildCount(); verify(listElementPresenterMock, times(1)).getItemContainer(eq(ITEM_ID), eq(propertyMapLocal), anyMap()); verify(elementsContainerMock, times(1)).appendChild(eq(itemElementMock)); verify(collectionEditorPresenterSpy, times(1)).toggleEditingStatus(eq(false)); }
@Override public void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues) { final UListElement elementsContainer = collectionView.getElementsContainer(); String itemId = String.valueOf(elementsContainer.getChildCount() - 1); final LIElement itemElement = listElementPresenter.getItemContainer(itemId, simplePropertiesValues, expandablePropertiesValues); elementsContainer.appendChild(itemElement); toggleEditingStatus(false); }
CollectionPresenter implements CollectionView.Presenter { @Override public void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues) { final UListElement elementsContainer = collectionView.getElementsContainer(); String itemId = String.valueOf(elementsContainer.getChildCount() - 1); final LIElement itemElement = listElementPresenter.getItemContainer(itemId, simplePropertiesValues, expandablePropertiesValues); elementsContainer.appendChild(itemElement); toggleEditingStatus(false); } }
CollectionPresenter implements CollectionView.Presenter { @Override public void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues) { final UListElement elementsContainer = collectionView.getElementsContainer(); String itemId = String.valueOf(elementsContainer.getChildCount() - 1); final LIElement itemElement = listElementPresenter.getItemContainer(itemId, simplePropertiesValues, expandablePropertiesValues); elementsContainer.appendChild(itemElement); toggleEditingStatus(false); }  }
CollectionPresenter implements CollectionView.Presenter { @Override public void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues) { final UListElement elementsContainer = collectionView.getElementsContainer(); String itemId = String.valueOf(elementsContainer.getChildCount() - 1); final LIElement itemElement = listElementPresenter.getItemContainer(itemId, simplePropertiesValues, expandablePropertiesValues); elementsContainer.appendChild(itemElement); toggleEditingStatus(false); }  @Override void initListStructure(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap, CollectionView collectionView); @Override void initMapStructure(String key, Map<String, String> keyPropertyMap, Map<String, String> valuePropertyMap, CollectionView collectionView); @Override void setValue(String jsonString); @Override void showEditingBox(); @Override void onToggleRowExpansion(boolean isShown); @Override void updateRowExpansionStatus(boolean isShown); @Override void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues); @Override void addMapItem(Map<String, String> keyPropertiesValues, Map<String, String> valuePropertiesValues); @Override void save(); @Override void remove(); @Override void toggleEditingStatus(boolean editingStatus); }
CollectionPresenter implements CollectionView.Presenter { @Override public void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues) { final UListElement elementsContainer = collectionView.getElementsContainer(); String itemId = String.valueOf(elementsContainer.getChildCount() - 1); final LIElement itemElement = listElementPresenter.getItemContainer(itemId, simplePropertiesValues, expandablePropertiesValues); elementsContainer.appendChild(itemElement); toggleEditingStatus(false); }  @Override void initListStructure(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap, CollectionView collectionView); @Override void initMapStructure(String key, Map<String, String> keyPropertyMap, Map<String, String> valuePropertyMap, CollectionView collectionView); @Override void setValue(String jsonString); @Override void showEditingBox(); @Override void onToggleRowExpansion(boolean isShown); @Override void updateRowExpansionStatus(boolean isShown); @Override void addListItem(Map<String, String> simplePropertiesValues, Map<String, Map<String, String>> expandablePropertiesValues); @Override void addMapItem(Map<String, String> keyPropertiesValues, Map<String, String> valuePropertiesValues); @Override void save(); @Override void remove(); @Override void toggleEditingStatus(boolean editingStatus);  }