Skip to content

Commit

Permalink
Override hello endpoint in mocks. fix name mock controller class
Browse files Browse the repository at this point in the history
  • Loading branch information
martinalig committed Dec 18, 2020
1 parent 53f805d commit 0815d44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ public class MockForceUpdateConfig {
@Bean
@Primary
public GaenConfigController gaenConfigController(Messages messages) {
return new MockInfoBoxController(messages);
return new MockForceUpdateController(messages);
}

public class MockInfoBoxController extends GaenConfigController {
public class MockForceUpdateController extends GaenConfigController {

public MockInfoBoxController(Messages messages) {
public MockForceUpdateController(Messages messages) {
super(messages);
}

@Override
public @Documentation(description = "Echo endpoint", responses = "200 => Hello from DP3T Config WS") String hello() {
return super.hello() + " (mock-forceupdate)";
}

@Override
public @Documentation(description = "Read latest configuration and messages, depending on the version of the phone and the app.", responses = "200 => ConfigResponse structure with eventual notifications and epidemic parameters") ResponseEntity<ConfigResponse> getConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public class MockInfoBoxController extends GaenConfigController {
public MockInfoBoxController(Messages messages) {
super(messages);
}

@Override
public @Documentation(description = "Echo endpoint", responses = "200 => Hello from DP3T Config WS") String hello() {
return super.hello() + " (mock-infobox)";
}

@Override
public @Documentation(description = "Read latest configuration and messages, depending on the version of the phone and the app.", responses = "200 => ConfigResponse structure with eventual notifications and epidemic parameters") ResponseEntity<ConfigResponse> getConfig(
Expand Down

0 comments on commit 0815d44

Please sign in to comment.