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