Package org.springframework.test.annotation.DirtiesContext

Examples of org.springframework.test.annotation.DirtiesContext.ClassMode


    final Class<DirtiesContext> annotationType = DirtiesContext.class;

    boolean methodDirtiesContext = testMethod.isAnnotationPresent(annotationType);
    boolean classDirtiesContext = testClass.isAnnotationPresent(annotationType);
    DirtiesContext classDirtiesContextAnnotation = testClass.getAnnotation(annotationType);
    ClassMode classMode = classDirtiesContext ? classDirtiesContextAnnotation.classMode() : null;

    if (logger.isDebugEnabled()) {
      logger.debug("After test method: context [" + testContext + "], class dirties context ["
          + classDirtiesContext + "], class mode [" + classMode + "], method dirties context ["
          + methodDirtiesContext + "].");
View Full Code Here


    final String annotationType = DirtiesContext.class.getName();
    AnnotationAttributes methodAnnAttrs = AnnotatedElementUtils.getAnnotationAttributes(testMethod, annotationType);
    AnnotationAttributes classAnnAttrs = AnnotatedElementUtils.getAnnotationAttributes(testClass, annotationType);
    boolean methodDirtiesContext = methodAnnAttrs != null;
    boolean classDirtiesContext = classAnnAttrs != null;
    ClassMode classMode = classDirtiesContext ? classAnnAttrs.<ClassMode> getEnum("classMode") : null;

    if (logger.isDebugEnabled()) {
      logger.debug(String.format(
        "After test method: context %s, class dirties context [%s], class mode [%s], method dirties context [%s].",
        testContext, classDirtiesContext, classMode, methodDirtiesContext));
View Full Code Here

    final String annotationType = DirtiesContext.class.getName();
    AnnotationAttributes methodAnnAttrs = AnnotatedElementUtils.getAnnotationAttributes(testMethod, annotationType);
    AnnotationAttributes classAnnAttrs = AnnotatedElementUtils.getAnnotationAttributes(testClass, annotationType);
    boolean methodDirtiesContext = methodAnnAttrs != null;
    boolean classDirtiesContext = classAnnAttrs != null;
    ClassMode classMode = classDirtiesContext ? classAnnAttrs.<ClassMode> getEnum("classMode") : null;

    if (logger.isDebugEnabled()) {
      logger.debug(String.format(
        "After test method: context %s, class dirties context [%s], class mode [%s], method dirties context [%s].",
        testContext, classDirtiesContext, classMode, methodDirtiesContext));
View Full Code Here

TOP

Related Classes of org.springframework.test.annotation.DirtiesContext.ClassMode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.