@Test public void removesSelectionIfVetorAgrees() throws Exception { selectionModel.setSelectionInterval(1, 1); selectionModel.addVetor(new Allower()); selectionModel.removeSelectionInterval(1, 1); assertEquals(-1, selectionModel.getMinSelectionIndex()); }
@Test public void doesNotRequestVetoIfNothingChangesOnRemoveInterval() throws Exception { Vetor vetor = mock(Vetor.class); selectionModel.clearSelection(); selectionModel.addVetor(vetor); selectionModel.removeSelectionInterval(1, 1); verifyZeroInteractions(vetor); }