Skip to content
Permalink
Browse files

clean up indent

  • Loading branch information...
bobjacobsen committed Aug 1, 2019
1 parent 6f11527 commit 3cf81f62ff2e35aa44ffef9167a884a448f8feeb
Showing with 19 additions and 20 deletions.
  1. +19 −20 java/test/jmri/jmrit/roster/swing/RosterFrameTest.java
@@ -21,7 +21,6 @@

private RosterFrame frame = null;


@Test
public void testCtor() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
@@ -136,11 +135,11 @@ public void testIdentify3WithDecoderTypeMismatch() {
// }, "error message at end");

JUnitUtil.waitFor(() ->{
return frame.getSelectedRosterEntries().length == 1;
}, "selection complete");
return frame.getSelectedRosterEntries().length == 1;
}, "selection complete");
RosterEntry[] selected = frame.getSelectedRosterEntries();
Assert.assertEquals("selected ", re1, selected[0]);
Assert.assertTrue("entry selected",frame.checkIfEntrySelected());
Assert.assertTrue("entry selected",frame.checkIfEntrySelected());

}

@@ -182,12 +181,12 @@ public void testIdentify3Multiple() {
// is not working. See @Ignore above

JUnitUtil.waitFor(() ->{
return frame.getSelectedRosterEntries().length == 2;
}, "selection complete");
return frame.getSelectedRosterEntries().length == 2;
}, "selection complete");
RosterEntry[] selected = frame.getSelectedRosterEntries();
Assert.assertEquals("selected ", re1, selected[0]);
Assert.assertEquals("selected ", re3, selected[1]);
Assert.assertTrue("entry selected",frame.checkIfEntrySelected());
Assert.assertTrue("entry selected",frame.checkIfEntrySelected());

}

@@ -228,12 +227,12 @@ public void testIdentify3ViaDecoderId() {
operator.pushIdentifyButton();

JUnitUtil.waitFor(() ->{
return frame.getSelectedRosterEntries().length == 1;
}, "selection complete");
return frame.getSelectedRosterEntries().length == 1;
}, "selection complete");
RosterEntry[] selected = frame.getSelectedRosterEntries();
Assert.assertEquals("selected ", 1, selected.length);
Assert.assertEquals("selected ", re3, selected[0]); // 2nd address=3 selected by decoder match
Assert.assertTrue("entry selected",frame.checkIfEntrySelected());
Assert.assertTrue("entry selected",frame.checkIfEntrySelected());

}

@@ -244,23 +243,23 @@ public void testCheckIfEntrySelected() {
frame.setVisible(true);
RosterFrameScaffold operator = new RosterFrameScaffold(frame.getTitle());
Thread t = new Thread(() -> {
jmri.util.swing.JemmyUtil.confirmJOptionPane(operator,"Message","","OK");
jmri.util.swing.JemmyUtil.confirmJOptionPane(operator,"Message","","OK");
});
t.setName("Error Dialog Close Thread");
t.start();
// the return true case happens in the identify methods above, so
// we only check the return false case here.
Assert.assertFalse("entry not selected",frame.checkIfEntrySelected());
// we only check the return false case here.
Assert.assertFalse("entry not selected",frame.checkIfEntrySelected());
}

@Test
public void testGetandSetAllowQuit() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
frame.setVisible(true);
frame.allowQuit(false);
Assert.assertFalse("Quit Not Allowed",frame.isAllowQuit());
frame.allowQuit(true);
Assert.assertTrue("Quit Allowed",frame.isAllowQuit());
frame.allowQuit(false);
Assert.assertFalse("Quit Not Allowed",frame.isAllowQuit());
frame.allowQuit(true);
Assert.assertTrue("Quit Allowed",frame.isAllowQuit());
}

@Before
@@ -276,14 +275,14 @@ public void setUp() {
Roster.getDefault(); // ensure exists
if(!GraphicsEnvironment.isHeadless()){
frame = new RosterFrame();
}
}
}

@After
public void tearDown() {
if(frame!=null) {
if(frame!=null) {
JUnitUtil.dispose(frame);
}
}
JUnitUtil.tearDown();
}

0 comments on commit 3cf81f6

Please sign in to comment.
You can’t perform that action at this time.