/** * Construct the set of requirements specified by annotations directly on a tester class or * method. * * @param classOrMethod a tester class or a test method thereof * @return all the constraints implicitly or explicitly required by annotations on the class or * method. * @throws ConflictingRequirementsException if the requirements are mutually inconsistent. */ public static TesterRequirements buildDeclaredTesterRequirements(AnnotatedElement classOrMethod) throws ConflictingRequirementsException { TesterRequirements requirements = new TesterRequirements(); Iterable<Annotation> testerAnnotations = getTesterAnnotations(classOrMethod); for (Annotation testerAnnotation : testerAnnotations) { TesterRequirements moreRequirements = buildTesterRequirements(testerAnnotation); incorporateRequirements(requirements, moreRequirements, testerAnnotation); } return requirements; }
/** * Construct the set of requirements specified by annotations directly on a tester class or * method. * * @param classOrMethod a tester class or a test method thereof * @return all the constraints implicitly or explicitly required by annotations on the class or * method. * @throws ConflictingRequirementsException if the requirements are mutually inconsistent. */ public static TesterRequirements buildDeclaredTesterRequirements(AnnotatedElement classOrMethod) throws ConflictingRequirementsException { TesterRequirements requirements = new TesterRequirements(); Iterable<Annotation> testerAnnotations = getTesterAnnotations(classOrMethod); for (Annotation testerAnnotation : testerAnnotations) { TesterRequirements moreRequirements = buildTesterRequirements(testerAnnotation); incorporateRequirements(requirements, moreRequirements, testerAnnotation); } return requirements; }
/** * Construct the set of requirements specified by annotations * directly on a tester class or method. * @param classOrMethod a tester class or a test method thereof * @return all the constraints implicitly or explicitly required by * annotations on the class or method. * @throws ConflictingRequirementsException if the requirements are mutually * inconsistent. */ public static TesterRequirements buildDeclaredTesterRequirements( AnnotatedElement classOrMethod) throws ConflictingRequirementsException { TesterRequirements requirements = new TesterRequirements(); Iterable<Annotation> testerAnnotations = getTesterAnnotations(classOrMethod); for (Annotation testerAnnotation : testerAnnotations) { TesterRequirements moreRequirements = buildTesterRequirements(testerAnnotation); incorporateRequirements( requirements, moreRequirements, testerAnnotation); } return requirements; }