注释类型 DirtiesContext

    • 元素详细资料

      • 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.

        从以下版本开始:
        4.2
        默认值:
        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.

        从以下版本开始:
        3.0
        默认值:
        org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS