Skip to content
Permalink
Browse files

fix spotbugs warnings

  • Loading branch information...
pabender committed May 25, 2019
1 parent 5b20b1e commit aa860599b310f44da068be69f72e23caa5774f05
@@ -62,8 +62,10 @@ public void testGetOBlock() {
OBlock bEast = _OBlockMgr.createNewOBlock("OB2", "East");
OBlock bNorth = _OBlockMgr.createNewOBlock("OB3", "North");
OBlock bSouth = _OBlockMgr.createNewOBlock("OB4", "South");
Assert.assertEquals("OBlock", bNorth, _OBlockMgr.getOBlock("North"));
Assert.assertEquals("OBlock", bWest, _OBlockMgr.getOBlock("West"));
Assert.assertEquals("OBlock", bEast, _OBlockMgr.getOBlock("OB2"));
Assert.assertEquals("OBlock", bNorth, _OBlockMgr.getOBlock("North"));
Assert.assertEquals("OBlock", bSouth, _OBlockMgr.getOBlock("OB4"));
}

// The minimal setup for log4J
@@ -26,7 +26,6 @@ public void testCreatandGetPortal() {
// are testing anything in the warrant.
OBlockManager _OBlockMgr = InstanceManager.getDefault(OBlockManager.class);
OBlock bWest = _OBlockMgr.createNewOBlock("OB1", "West");
OBlock bEast = _OBlockMgr.createNewOBlock("OB2", "East");
OBlock bNorth = _OBlockMgr.createNewOBlock("OB3", "North");
OBlock bSouth = _OBlockMgr.createNewOBlock("OB4", "South");

@@ -46,7 +46,6 @@ public void testWarrant() {
warrant.addThrottleCommand(new ThrottleSetting(100, "NoOp", "Enter Block", "South"));
warrant.addThrottleCommand(new ThrottleSetting(100, "Speed", "0.3", "South"));
warrant.addThrottleCommand(new ThrottleSetting(100, "Speed", "0.0", "South"));
List<ThrottleSetting> list = warrant.getThrottleCommands();

warrant.getSpeedUtil().setDccAddress("999(L)");
warrant.setBlockOrders(orders);
@@ -65,7 +64,6 @@ public void testWarrant() {

jmri.util.JUnitUtil.waitFor(() -> {
String m = warrant.getRunningMessage();
System.out.println(m);
return m.endsWith("Cmd #2.") || m.endsWith("Cmd #3.");
}, "Train starts to move after 2nd command");
jmri.util.JUnitUtil.releaseThread(this, 100); // What should we specifically waitFor?
@@ -175,8 +175,7 @@ public void testWarrant() {
warrant.addThrottleCommand(new ThrottleSetting(100, "NoOp", "Enter Block", "South"));
warrant.addThrottleCommand(new ThrottleSetting(100, "Speed", "0.3", "South"));
warrant.addThrottleCommand(new ThrottleSetting(100, "Speed", "0.0", "South"));
List<ThrottleSetting> list = warrant.getThrottleCommands();


warrant.getSpeedUtil().setDccAddress("999(L)");
String msg = warrant.allocateRoute(false, orders);
SpeedUtil su = warrant.getSpeedUtil();
@@ -321,7 +320,7 @@ public void tearDown() {
_portalMgr=null;
_sensorMgr=null;
_turnoutMgr=null;
bWest=null;;
bWest=null;
bEast=null;
bNorth=null;
bSouth=null;

0 comments on commit aa86059

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