MatsTestContext
and
MatsTestInfrastructureConfiguration
.See: Description
Class | Description |
---|---|
MatsTestContext.MatsSimpleTestInfrastructureContextInitializer |
The reason for this obscure way to add the
MatsTestInfrastructureConfiguration (as opposed to just point
to it with "classes=..") is as follows: Spring's testing integration has this feature where any static
inner @Configuration class of the test class is automatically loaded. |
MatsTestDbContext.MatsSimpleTestInfrastructureDbContextInitializer |
The reason for this obscure way to add the
MatsTestInfrastructureDbConfiguration (as opposed to just
point to it with "classes=..") is as follows: Spring's testing integration has this feature where any static
inner @Configuration class of the test class is automatically loaded. |
MatsTestInfrastructureConfiguration |
Spring
@Configuration class that cooks up the simple test infrastructure, employing a
MatsSerializer from the Spring context if available, otherwise creates a default MatsSerializerJson . |
MatsTestInfrastructureDbConfiguration |
Same as
MatsTestInfrastructureConfiguration , but includes a H2 DataSource, as configured by
MatsTestInfrastructureDbConfiguration.MatsTestH2DataSourceConfiguration , which uses the TestH2DataSource.createStandard() convenience
method. |
MatsTestInfrastructureDbConfiguration.MatsTestH2DataSourceConfiguration | |
SpringInjectRulesAndExtensions.SpringInjectRulesAndExtensionsTestExecutionListener |
This
TestExecutionListener finds all fields in the test class instance which is annotated with JUnit
Rule or JUnit 5 Jupiter RegisterExtension , and runs
beanFactory.autowireBean(fieldValue) on them. |
TestSpringMatsFactoryProvider |
A testing-oriented
MatsFactory -provider which utilizes the MatsTestBroker for the produced
MatsFactory to connect to - this is for the scenarios where you do NOT have your test load the entire
application's Spring configuration, but instead "piece together" the relevant Spring
@Components containing test-relevant Mats endpoints and other beans from your application
along with test-specific mocked-out endpoints: You will then probably not have the MatsFactory present in the Spring
context. |
Annotation Type | Description |
---|---|
MatsTestContext |
One-stop-shop for making simple Spring-based integration/unit tests of Mats endpoints (NOT utilizing SQL
Connections), automatically importing the configuration .
|
MatsTestDbContext |
Same as
MatsTestContext , but includes a H2 DataSource, as configured by
MatsTestInfrastructureDbConfiguration . |
MatsTestProfile |
The only thing this annotation does, is to meta-annotate the test class with
@ActiveProfiles( . |
SpringInjectRulesAndExtensions |
Use this Test Execution Listener to autowire JUnit Rules and Jupiter Extensions, i.e.
|
MatsTestContext
and
MatsTestInfrastructureConfiguration
.