Class MatsTestContext.MatsSimpleTestInfrastructureContextInitializer

java.lang.Object
io.mats3.spring.test.MatsTestContext.MatsSimpleTestInfrastructureContextInitializer
All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
Enclosing class:
MatsTestContext

public static class MatsTestContext.MatsSimpleTestInfrastructureContextInitializer extends Object implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
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. If we specify specify classes= or location=, this default will be thwarted.
See Also:
  • Constructor Details

    • MatsSimpleTestInfrastructureContextInitializer

      public MatsSimpleTestInfrastructureContextInitializer()
  • Method Details

    • initialize

      public void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
      Specified by:
      initialize in interface org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>