Examples of IAnnotation


Examples of org.testng.annotations.IAnnotation

  public IAnnotation createTag(Class<?> cls, Annotation a,
      Class<?> annotationClass,
      IAnnotationTransformer transformer)
  {
    IAnnotation result = null;

    if (a != null) {
      if (annotationClass == IConfigurationAnnotation.class) {
        result = createConfigurationTag(cls, a);
      }
View Full Code Here

Examples of org.testng.annotations.IAnnotation

  }

  private IAnnotation maybeCreateNewConfigurationTag(Class<?> cls, Annotation a,
      Class<?> annotationClass)
  {
    IAnnotation result = null;
   
    if (annotationClass == IBeforeSuite.class) {
      BeforeSuite bs = (BeforeSuite) a;
      result = createConfigurationTag(cls, a,
          true, false,
View Full Code Here

Examples of org.testng.internal.annotations.IAnnotation

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

Examples of org.testng.internal.annotations.IAnnotation

   */
  public static Method findFactoryMethod(Class cls, IAnnotationFinder finder) {
    Method result = null;

    for (Method method : cls.getDeclaredMethods()) {
      IAnnotation f = finder.findAnnotation(method, IFactory.class);

      if (null != f) {
        if (null != result) {
          throw new TestNGException(cls.getName() + ":  only one @Factory method allowed");
        }
View Full Code Here

Examples of org.testng.internal.annotations.IAnnotation

      outer:
      for (Class cls : allClasses)
        try {
          if (null != cls) {
            for (Method m : cls.getMethods()) {
              IAnnotation a = annotationFinder.findAnnotation(m, org.testng.internal.annotations.IObjectFactory.class);
              if (null != a) {
                if (!IObjectFactory.class.isAssignableFrom(m.getReturnType())) {
                  throw new TestNGException("Return type of " + m + " is not IObjectFactory");
                }
                try {
View Full Code Here

Examples of org.testng.internal.annotations.IAnnotation

      try {
        for(Class annotation : allAnnotations) {
          // Try on the methods
          for(Method m : cls.getMethods()) {
            IAnnotation ma= annotationFinder.findAnnotation(m, annotation);
            if(null != ma) {
              return true;
            }
          }

          // Try on the class
        IAnnotation a= annotationFinder.findAnnotation(cls, annotation);
        if(null != a) {
          return true;
        }

        // Try on the constructors
          for(Constructor ctor : cls.getConstructors()) {
            IAnnotation ca= annotationFinder.findAnnotation(ctor, annotation);
            if(null != ca) {
              return true;
            }
          }
        }
View Full Code Here

Examples of org.testng.internal.annotations.IAnnotation

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

Examples of org.testng.internal.annotations.IAnnotation

    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

Examples of org.testng.internal.annotations.IAnnotation

    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

Examples of org.testng.internal.annotations.IAnnotation

   */
  public static Method findFactoryMethod(Class<?> cls, IAnnotationFinder finder) {
    Method result = null;

    for (Method method : cls.getDeclaredMethods()) {
      IAnnotation f = finder.findAnnotation(method, IFactory.class);

      if (null != f) {
        if (null != result) {
          throw new TestNGException(cls.getName() + ":  only one @Factory method allowed");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.