Skip to content
Permalink
Browse files

init common values in @before method

  • Loading branch information...
pabender committed Sep 18, 2019
1 parent b868bb8 commit 030a4732e2a0c848f1aaa92b048a944a06faec57
Showing with 3 additions and 12 deletions.
  1. +3 −12 java/test/jmri/jmrit/logix/LinkedWarrantTest.java
@@ -41,9 +41,6 @@ public void testLoopedWarrant() throws Exception {
// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/ShortBlocksTest.xml");
InstanceManager.getDefault(ConfigureManager.class).load(f);
_OBlockMgr = InstanceManager.getDefault(OBlockManager.class);
_sensorMgr = InstanceManager.getDefault(SensorManager.class);
_warrantMgr = InstanceManager.getDefault(WarrantManager.class);

ControlPanelEditor panel = (ControlPanelEditor) jmri.util.JmriJFrame.getFrame("LinkedWarrantsTest");
panel.setVisible(false); // hide panel to prevent repaint.
@@ -121,9 +118,6 @@ public void testLinkedWarrant() throws Exception {
// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/ShortBlocksTest.xml");
InstanceManager.getDefault(ConfigureManager.class).load(f);
_OBlockMgr = InstanceManager.getDefault(OBlockManager.class);
_sensorMgr = InstanceManager.getDefault(SensorManager.class);
_warrantMgr = InstanceManager.getDefault(WarrantManager.class);

ControlPanelEditor panel = (ControlPanelEditor) jmri.util.JmriJFrame.getFrame("LinkedWarrantsTest");
panel.setVisible(false); // hide panel to prevent repaint.
@@ -207,9 +201,6 @@ public void testBackAndForth() throws Exception {
// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/ShortBlocksTest.xml");
InstanceManager.getDefault(ConfigureManager.class).load(f);
_OBlockMgr = InstanceManager.getDefault(OBlockManager.class);
_sensorMgr = InstanceManager.getDefault(SensorManager.class);
_warrantMgr = InstanceManager.getDefault(WarrantManager.class);

ControlPanelEditor panel = (ControlPanelEditor) jmri.util.JmriJFrame.getFrame("LinkedWarrantsTest");
panel.setVisible(false); // hide panel to prevent repaint.
@@ -303,9 +294,6 @@ public void testLinkedMidScript() throws Exception {
// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/NXWarrantTest.xml");
InstanceManager.getDefault(ConfigureManager.class).load(f);
_OBlockMgr = InstanceManager.getDefault(OBlockManager.class);
_sensorMgr = InstanceManager.getDefault(SensorManager.class);
_warrantMgr = InstanceManager.getDefault(WarrantManager.class);

ControlPanelEditor panel = (ControlPanelEditor) jmri.util.JmriJFrame.getFrame("NXWarrantTest");
panel.setVisible(false); // hide panel to prevent repaint.
@@ -422,6 +410,9 @@ public void setUp() throws Exception {
JUnitUtil.initLogixManager();
JUnitUtil.initWarrantManager();
JUnitUtil.initShutDownManager();
_OBlockMgr = InstanceManager.getDefault(OBlockManager.class);
_sensorMgr = InstanceManager.getDefault(SensorManager.class);
_warrantMgr = InstanceManager.getDefault(WarrantManager.class);
}

@After

0 comments on commit 030a473

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