Interface ApplicationContextAssertProvider<C extends org.springframework.context.ApplicationContext>

    • Field Summary

      • Fields inherited from interface org.springframework.beans.factory.BeanFactory

        FACTORY_BEAN_PREFIX
      • Fields inherited from interface org.springframework.core.io.ResourceLoader

        CLASSPATH_URL_PREFIX
      • Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver

        CLASSPATH_ALL_URL_PREFIX
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      ApplicationContextAssert<C>assertThat()
      Deprecated.
      use standard AssertJ assertThat(context)... calls instead.
      voidclose() 
      static <T extends ApplicationContextAssertProvider<C>,​C extends org.springframework.context.ApplicationContext>
      T
      get​(Class<T> type, Class<? extends C> contextType, Supplier<? extends C> contextSupplier)
      Factory method to create a new ApplicationContextAssertProvider instance.
      CgetSourceApplicationContext()
      Return the original source ApplicationContext.
      <T extends C>
      T
      getSourceApplicationContext​(Class<T> requiredType)
      Return the original source ApplicationContext, casting it to the requested type.
      ThrowablegetStartupFailure()
      Return the failure that caused application context to fail or null if the context started without issue.
      • Methods inherited from interface org.springframework.context.ApplicationContext

        getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
      • Methods inherited from interface org.springframework.context.ApplicationEventPublisher

        publishEvent, publishEvent
      • Methods inherited from interface org.springframework.beans.factory.BeanFactory

        containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
      • Methods inherited from interface org.springframework.core.env.EnvironmentCapable

        getEnvironment
      • Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory

        containsLocalBean, getParentBeanFactory
      • Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory

        containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation
      • Methods inherited from interface org.springframework.context.MessageSource

        getMessage, getMessage, getMessage
      • Methods inherited from interface org.springframework.core.io.ResourceLoader

        getClassLoader, getResource
      • Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver

        getResources
    • Method Detail

      • assertThat

        @Deprecated
        ApplicationContextAssert<CassertThat()
        Deprecated.
        use standard AssertJ assertThat(context)... calls instead.
        Return an assert for AspectJ.
        Specified by:
        assertThat in interface org.assertj.core.api.AssertProvider<C extends org.springframework.context.ApplicationContext>
        Returns:
        an AspectJ assert
      • getSourceApplicationContext

        <T extends C> T getSourceApplicationContext​(Class<T> requiredType)
        Return the original source ApplicationContext, casting it to the requested type.
        Type Parameters:
        T - the context type
        Parameters:
        requiredType - the required context type
        Returns:
        the source application context
        Throws:
        IllegalStateException - if the source context failed to start
      • getStartupFailure

        Throwable getStartupFailure()
        Return the failure that caused application context to fail or null if the context started without issue.
        Returns:
        the startup failure or null