-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #612: fix autoconfiguration for taskana-adapter-camunda-outbox…
…-rest
- Loading branch information
Showing
4 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...pter-camunda-outbox-rest-spring-boot-starter/src/main/resources/META-INF/spring.factories
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pro.taskana.adapter.camunda.outbox.rest.spring.boot.starter.config.OutboxRestServiceAutoConfiguration |
53 changes: 53 additions & 0 deletions
53
...amunda/outbox/rest/spring/boot/starter/config/OutboxRestServiceAutoConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package pro.taskana.adapter.camunda.outbox.rest.spring.boot.starter.config; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.context.annotation.Configuration; | ||
import pro.taskana.adapter.camunda.outbox.rest.config.OutboxRestServiceConfig; | ||
import pro.taskana.adapter.camunda.outbox.rest.controller.CamundaTaskEventsController; | ||
import pro.taskana.adapter.camunda.parselistener.TaskanaParseListenerProcessEnginePlugin; | ||
|
||
@SpringBootTest | ||
class OutboxRestServiceAutoConfigurationTest { | ||
|
||
private final OutboxRestServiceConfig outboxRestServiceConfig; | ||
|
||
private final CamundaTaskEventsController camundaTaskEventsController; | ||
|
||
private final TaskanaParseListenerProcessEnginePlugin taskanaParseListenerProcessEnginePlugin; | ||
|
||
OutboxRestServiceAutoConfigurationTest( | ||
@Autowired(required = false) OutboxRestServiceConfig outboxRestServiceConfig, | ||
@Autowired(required = false) CamundaTaskEventsController camundaTaskEventsController, | ||
@Autowired(required = false) | ||
TaskanaParseListenerProcessEnginePlugin taskanaParseListenerProcessEnginePlugin) { | ||
this.outboxRestServiceConfig = outboxRestServiceConfig; | ||
this.camundaTaskEventsController = camundaTaskEventsController; | ||
this.taskanaParseListenerProcessEnginePlugin = taskanaParseListenerProcessEnginePlugin; | ||
} | ||
|
||
@Test | ||
void outboxRestServiceConfig_is_automatically_configured() { | ||
assertThat(outboxRestServiceConfig).isNotNull(); | ||
} | ||
|
||
@Test | ||
void camundaTaskEventsController_is_automatically_configured() { | ||
assertThat(outboxRestServiceConfig).isNotNull(); | ||
} | ||
|
||
@Test | ||
void taskanaParseListenerProcessEnginePlugin_is_automatically_configured() { | ||
assertThat(outboxRestServiceConfig).isNotNull(); | ||
} | ||
|
||
@Configuration | ||
@EnableAutoConfiguration | ||
static class TestConfig { | ||
// empty class to enable AutoConfiguration and configure spring boot test for it | ||
} | ||
} |