Skip to content

Commit

Permalink
Fix of tests failing on CruiseControlOptions.getInstance(); creates i…
Browse files Browse the repository at this point in the history
…nstance with default values
  • Loading branch information
t-dan committed Nov 13, 2018
1 parent 3204d18 commit 567f998
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Expand Up @@ -67,7 +67,8 @@ public abstract class BaseFunctionalTest extends TestCase {

protected WebTester tester;

public final void setUp() throws Exception {
@Override
public void setUp() throws Exception {
tester = new WebTester();
tester.setScriptingEnabled(false);
tester.getTestContext().setBaseUrl(BASE_URL);
Expand Down
Expand Up @@ -42,6 +42,7 @@
import net.sourceforge.cruisecontrol.BuildLoopInformationBuilder;
import net.sourceforge.cruisecontrol.CruiseControlController;
import net.sourceforge.cruisecontrol.CruiseControlException;
import net.sourceforge.cruisecontrol.CruiseControlOptions;
import net.sourceforge.cruisecontrol.LabelIncrementer;
import net.sourceforge.cruisecontrol.Modification;
import net.sourceforge.cruisecontrol.ProjectConfig;
Expand All @@ -54,6 +55,18 @@

public class BuildLoopSmokeTest extends BaseFunctionalTest {

@Override
public final void setUp() throws Exception {
super.setUp();
CruiseControlOptions.getInstance(this);
}

@Override
public final void tearDown() throws Exception {
super.tearDown();
CruiseControlOptions.delInstance(this);
}

public void testDashboardShouldReceiveSameBuildInformationBuildLoopSent() throws Exception {
final String status = "now building since 20031212152235";
BuildLoopInformationBuilder builder =
Expand Down Expand Up @@ -89,6 +102,7 @@ public CruiseControlControllerStub(String projectName, String status) {
this.status = status;
}

@Override
public List<ProjectInterface> getProjects() {
ProjectConfig p1 = new ProjectConfig() {
@Override
Expand Down

0 comments on commit 567f998

Please sign in to comment.