コード例 #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 indexIndicatesNoSelectionAfterClearing() throws Exception {
   selectionModel.clearSelection();
   assertEquals(-1, selectionModel.getMinSelectionIndex());
 }
コード例 #3
0
 @Test
 public void addsSelectionIfVetorAgrees() throws Exception {
   selectionModel.addVetor(new Allower());
   selectionModel.addSelectionInterval(1, 2);
   assertEquals(2, selectionModel.getMinSelectionIndex());
 }
コード例 #4
0
 @Test
 public void doesNotChangeSelectionIfVetorDisagrees() throws Exception {
   selectionModel.addVetor(new Denier());
   selectionModel.addSelectionInterval(1, 2);
   assertEquals(-1, selectionModel.getMinSelectionIndex());
 }