Skip to content

Commit

Permalink
test: Initialize RosterConfigManager where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwood committed Aug 6, 2019
1 parent 017a9df commit 4a2ec85
Show file tree
Hide file tree
Showing 11 changed files with 322 additions and 327 deletions.
11 changes: 5 additions & 6 deletions java/test/apps/gui3/dp3/DecoderPro3WindowTest.java
Expand Up @@ -6,7 +6,6 @@
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

/**
Expand All @@ -23,14 +22,14 @@ public void testCTor() {
JUnitUtil.dispose(t);
}

// The minimal setup for log4J
@Before
public void setUp() {
JUnitUtil.setUp();
jmri.util.JUnitUtil.initDefaultUserMessagePreferences();
jmri.util.JUnitUtil.resetProfileManager();
jmri.util.JUnitUtil.initConnectionConfigManager();
jmri.util.JUnitUtil.initDebugProgrammerManager();
JUnitUtil.initDefaultUserMessagePreferences();
JUnitUtil.resetProfileManager();
JUnitUtil.initRosterConfigManager();
JUnitUtil.initConnectionConfigManager();
JUnitUtil.initDebugProgrammerManager();
jmri.InstanceManager.setDefault(jmri.jmrit.symbolicprog.ProgrammerConfigManager.class,new jmri.jmrit.symbolicprog.ProgrammerConfigManager());
}

Expand Down
240 changes: 118 additions & 122 deletions java/test/jmri/jmrit/consisttool/ConsistToolFrameTest.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion java/test/jmri/jmrit/dispatcher/DispatcherFrameTest.java
Expand Up @@ -2,7 +2,6 @@

import java.awt.GraphicsEnvironment;
import jmri.InstanceManager;
import jmri.Scale;
import jmri.util.JUnitUtil;
import org.junit.After;
import org.junit.Assert;
Expand Down Expand Up @@ -168,6 +167,7 @@ public void testCancelRestartButton() throws Exception {
public void setUp() throws Exception {
JUnitUtil.setUp();
JUnitUtil.resetProfileManager();
JUnitUtil.initRosterConfigManager();
JUnitUtil.initDebugThrottleManager();
}

Expand Down
Expand Up @@ -34,12 +34,12 @@ public void testPane() {
PaneProgFrame p = new PaneProgFrame(null, new RosterEntry(),
"test frame", "programmers/Basic.xml",
new jmri.progdebugger.ProgDebugger(), false) {
// dummy implementations
@Override
protected JPanel getModePane() {
return new JPanel();
}
};
// dummy implementations
@Override
protected JPanel getModePane() {
return new JPanel();
}
};

// invoke
result = null;
Expand All @@ -60,12 +60,12 @@ public void testFrame() {
PaneProgFrame p = new PaneProgFrame(null, new RosterEntry(),
"test frame", "programmers/Basic.xml",
new jmri.progdebugger.ProgDebugger(), false) {
// dummy implementations
@Override
protected JPanel getModePane() {
return null;
}
};
// dummy implementations
@Override
protected JPanel getModePane() {
return null;
}
};

// ugly, temporary way to load the decoder info
jmri.jmrit.decoderdefn.DecoderFileTest t = new jmri.jmrit.decoderdefn.DecoderFileTest();
Expand Down Expand Up @@ -150,14 +150,13 @@ void setupDoc() {
)
)
); // end of adding contents

return;
}

@Before
public void setUp() {
JUnitUtil.setUp();
JUnitUtil.resetProfileManager();
JUnitUtil.initRosterConfigManager();
}

@After
Expand Down

0 comments on commit 4a2ec85

Please sign in to comment.