public class Extension_Mats
extends io.mats3.test.abstractunit.AbstractMatsTest<java.lang.String>
implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
MatsFactory utilizing an in-vm
Active MQ broker.
By default the rule will create a MatsSerializer_DefaultJson which will be the serializer
utilized by the created MatsFactory. Should one want to use a different serializer which
serializes to the type of String then this can be specified using the method create(MatsSerializer).
However should one want to specify a serializer which serializes into anything other than String, then
Extension_MatsGeneric offers this possibility.
Extension_Mats shall be annotated with RegisterExtension and the
instance field shall be static for the Jupiter life cycle to pick up the extension at the correct time.
Extension_Mats can be viewed in the same manner as one would view a ClassRule in JUnit4.
Example:
public class YourTestClass {
@RegisterExtension
public static final Extension_Mats MATS = Extension_Mats.createRule()
}
Extension_MatsGeneric| Modifier | Constructor and Description |
|---|---|
protected |
Extension_Mats(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer) |
protected |
Extension_Mats(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer,
javax.sql.DataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterAll(org.junit.jupiter.api.extension.ExtensionContext context)
Executed by Jupiter after all test methods have been executed.
|
void |
beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
Executed by Jupiter before any test method is executed.
|
static Extension_Mats |
create()
Creates an
Extension_Mats utilizing the MATS default serializer |
static Extension_Mats |
create(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer)
Creates an
Extension_Mats utilizing the user provided MatsSerializer which serializes to the type
of String. |
static Extension_Mats |
createWithDb() |
static Extension_Mats |
createWithDb(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer) |
afterAll, beforeAll, cleanMatsFactories, cleanMatsFactory, createMatsFactory, getDataSource, getJmsConnectionFactory, getMatsFactory, getMatsFuturizer, getMatsInitiator, getMatsInterceptableMatsFactory, getMatsTestBrokerInterface, getMatsTestLatch, getMatsTestMqInterface, idprotected Extension_Mats(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer)
protected Extension_Mats(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer,
javax.sql.DataSource dataSource)
public static Extension_Mats create()
Extension_Mats utilizing the MATS default serializerpublic static Extension_Mats create(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer)
Extension_Mats utilizing the user provided MatsSerializer which serializes to the type
of String.public static Extension_Mats createWithDb()
public static Extension_Mats createWithDb(io.mats3.serial.MatsSerializer<java.lang.String> matsSerializer)
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallbackpublic void afterAll(org.junit.jupiter.api.extension.ExtensionContext context)
afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback