Annotation Type DirtiesContext

    • Element Detail

      • methodMode

        DirtiesContext.MethodMode methodMode
        The mode to use when a test method is annotated with @DirtiesContext.

        Defaults to AFTER_METHOD.

        Setting the method mode on an annotated test class has no meaning. For class-level control, use classMode() instead.

        Since:
        4.2
        Default:
        org.springframework.test.annotation.DirtiesContext.MethodMode.AFTER_METHOD
      • classMode

        DirtiesContext.ClassMode classMode
        The mode to use when a test class is annotated with @DirtiesContext.

        Defaults to AFTER_CLASS.

        Setting the class mode on an annotated test method has no meaning. For method-level control, use methodMode() instead.

        Since:
        3.0
        Default:
        org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS