@Test public void selectAllFreePages() { DocumentReference document1 = new DocumentReference("wiki1", "space1", "document1"); DocumentReference document2 = new DocumentReference("wiki2", "space2", "document2"); EntitySelection selection1 = new EntitySelection(document1); selection1.setSelected(false); EntitySelection selection2 = new EntitySelection(document2); selection2.setSelected(false); Map<EntityReference, EntitySelection> concernedEntities = new HashMap<>(); concernedEntities.put(document1, selection1); concernedEntities.put(document2, selection2); XClassBreakingQuestion question = new XClassBreakingQuestion(concernedEntities); question.selectAllFreePages(); assertFalse(selection1.isSelected()); assertFalse(selection2.isSelected()); question.markAsFreePage(selection1); question.selectAllFreePages(); assertTrue(selection1.isSelected()); assertFalse(selection2.isSelected()); }
public void selectAllFreePages() { for (EntitySelection entitySelection : freePages) { entitySelection.setSelected(true); } }
XClassBreakingQuestion { public void selectAllFreePages() { for (EntitySelection entitySelection : freePages) { entitySelection.setSelected(true); } } }
XClassBreakingQuestion { public void selectAllFreePages() { for (EntitySelection entitySelection : freePages) { entitySelection.setSelected(true); } } XClassBreakingQuestion(Map<EntityReference, EntitySelection> concernedEntities); }
XClassBreakingQuestion { public void selectAllFreePages() { for (EntitySelection entitySelection : freePages) { entitySelection.setSelected(true); } } XClassBreakingQuestion(Map<EntityReference, EntitySelection> concernedEntities); void markAsFreePage(EntitySelection entitySelection); void markImpactedObject(EntitySelection entitySelection, EntityReference documentObjectName); Map<EntityReference, Set<EntityReference>> getImpactedObjects(); void unselectAll(); Set<EntitySelection> getXClassPages(); Set<EntitySelection> getFreePages(); void setSelectedDocuments(Set<DocumentReference> documents); void selectAllFreePages(); void setSelectAllFreePages(boolean select); boolean isRefactoringForbidden(); void setRefactoringForbidden(boolean refactoringForbidden); boolean isObjectsPotentiallyHidden(); void setObjectsPotentiallyHidden(boolean objectsPotentiallyHidden); Map<EntityReference, EntitySelection> getConcernedEntities(); }
XClassBreakingQuestion { public void selectAllFreePages() { for (EntitySelection entitySelection : freePages) { entitySelection.setSelected(true); } } XClassBreakingQuestion(Map<EntityReference, EntitySelection> concernedEntities); void markAsFreePage(EntitySelection entitySelection); void markImpactedObject(EntitySelection entitySelection, EntityReference documentObjectName); Map<EntityReference, Set<EntityReference>> getImpactedObjects(); void unselectAll(); Set<EntitySelection> getXClassPages(); Set<EntitySelection> getFreePages(); void setSelectedDocuments(Set<DocumentReference> documents); void selectAllFreePages(); void setSelectAllFreePages(boolean select); boolean isRefactoringForbidden(); void setRefactoringForbidden(boolean refactoringForbidden); boolean isObjectsPotentiallyHidden(); void setObjectsPotentiallyHidden(boolean objectsPotentiallyHidden); Map<EntityReference, EntitySelection> getConcernedEntities();  }