Package org.testng.annotations

Examples of org.testng.annotations.IAnnotation


  private IAnnotation findAnnotation(Class cls, Annotation a,
      Class annotationClass,
      Class testClass, Constructor testConstructor, Method testMethod)
  {

    IAnnotation result = null;
    Pair p;
    if (testClass != null) {
      p = new Pair(a, testClass);
    }
    else if (testConstructor != null) {
View Full Code Here


  private boolean inheritGroupsFromTestClass() {
    return m_inheritGroupsFromTestClass;
  }
 
  private void init() {
    IAnnotation a = AnnotationHelper.findConfiguration(m_annotationFinder, m_method);
    IConfigurationAnnotation annotation = (IConfigurationAnnotation) a;
    if (a != null) {
      m_inheritGroupsFromTestClass = annotation.getInheritGroups();
      setDescription(annotation.getDescription());
    }
View Full Code Here

    return clone;
  }
 
  public boolean isFirstTimeOnly() {
    boolean result = false;
    IAnnotation before = m_annotationFinder.findAnnotation(getMethod(), IBeforeMethod.class);
    if (before != null) {
      result = ((ConfigurationAnnotation) before).isFirstTimeOnly();
    }
    return result;
  }
View Full Code Here

    return result;
  }

  public boolean isLastTimeOnly() {
    boolean result = false;
    IAnnotation before = m_annotationFinder.findAnnotation(getMethod(), IAfterMethod.class);
    if (before != null) {
      result = ((ConfigurationAnnotation) before).isLastTimeOnly();
    }
    return result;
  }
View Full Code Here

  @Override
  public IAnnotation findAnnotation(Method m, Class annotationClass) {
    Class a = m_annotationMap.get(annotationClass);
    assert a != null : "Annotation class not found:" + annotationClass;
    IAnnotation result =
      findAnnotation(m.getDeclaringClass(), m.getAnnotation(a), annotationClass,
          null, null, m);
   
    return result;
  }
View Full Code Here

  public IAnnotation findAnnotation(Class cls, Class annotationClass) {
    Class a = m_annotationMap.get(annotationClass);
    if (a == null) {
      throw new AssertionError("Class " + annotationClass + " doesn't have an IAnnotation");
    }
    IAnnotation result =
      findAnnotation(cls, findAnnotationInSuperClasses(cls, a), annotationClass,
          cls, null, null);

    return result;
  }
View Full Code Here

  }
 
  @Override
  public IAnnotation findAnnotation(Constructor m, Class annotationClass) {
    Class a = m_annotationMap.get(annotationClass);
    IAnnotation result =
      findAnnotation(m.getDeclaringClass(), m.getAnnotation(a), annotationClass,
          null, m, null);
   
    return result;
  }
View Full Code Here

  private IAnnotation findAnnotation(Class cls, Annotation a,
      Class annotationClass,
      Class testClass, Constructor testConstructor, Method testMethod)
  {

    IAnnotation result = null;
    Pair<Annotation, Class> p1;
    Pair<Annotation, Constructor> p2;
    Pair<Annotation, Class> p3;
   
    Pair p;
View Full Code Here

  private boolean inheritGroupsFromTestClass() {
    return m_inheritGroupsFromTestClass;
  }
 
  private void init() {
    IAnnotation a = AnnotationHelper.findConfiguration(m_annotationFinder, m_method);
    IConfigurationAnnotation annotation = (IConfigurationAnnotation) a;
    if (a != null) {
      m_inheritGroupsFromTestClass = annotation.getInheritGroups();
      setDescription(annotation.getDescription());
    }
View Full Code Here

    return clone;
  }
 
  public boolean isFirstTimeOnly() {
    boolean result = false;
    IAnnotation before = m_annotationFinder.findAnnotation(getMethod(), IBeforeMethod.class);
    if (before != null) {
      result = ((ConfigurationAnnotation) before).isFirstTimeOnly();
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.testng.annotations.IAnnotation

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.