private boolean isAnnotatedWithAValidStepAnnotation(final Method method) { Annotation[] annotations = method.getAnnotations(); for (Annotation annotation : annotations) { if (isAThucydidesStep(annotation) || (AnnotatedStepDescription.isACompatibleStep(annotation))) { return true; } } return false; }
private boolean isAnnotatedWithAValidStepAnnotation(final Method method) { Annotation[] annotations = method.getAnnotations(); for (Annotation annotation : annotations) { if (isAThucydidesStep(annotation) || (AnnotatedStepDescription.isACompatibleStep(annotation))) { return true; } } return false; }
private boolean isAnnotatedWithAValidStepAnnotation(final Method method) { Annotation[] annotations = method.getAnnotations(); for (Annotation annotation : annotations) { if (isAThucydidesStep(annotation) || (AnnotatedStepDescription.isACompatibleStep(annotation))) { return true; } } return false; }
private Optional<String> getCompatibleStepNameFrom(Method testMethod) { Annotation[] annotations = testMethod.getAnnotations(); for (Annotation annotation : annotations) { if (isACompatibleStep(annotation)) { try { String annotationType = annotation.annotationType().getSimpleName(); String annotatedValue = (String)annotation.getClass().getMethod("value").invoke(annotation); if (StringUtils.isEmpty(annotatedValue)) { return Optional.absent(); } else { return Optional.of(annotationType + " " + StringUtils.uncapitalize(annotatedValue)); } } catch (Exception ignoredException) {} } } return Optional.absent(); }
private Optional<String> getCompatibleStepNameFrom(Method testMethod) { Annotation[] annotations = testMethod.getAnnotations(); for (Annotation annotation : annotations) { if (isACompatibleStep(annotation)) { try { String annotationType = annotation.annotationType().getSimpleName(); String annotatedValue = (String)annotation.getClass().getMethod("value").invoke(annotation); if (StringUtils.isEmpty(annotatedValue)) { return Optional.empty(); } else { return Optional.of(annotationType + " " + StringUtils.uncapitalize(annotatedValue)); } } catch (Exception ignoredException) {} } } return Optional.empty(); }
private Optional<String> getCompatibleStepNameFrom(Method testMethod) { Annotation[] annotations = testMethod.getAnnotations(); for (Annotation annotation : annotations) { if (isACompatibleStep(annotation)) { try { String annotationType = annotation.annotationType().getSimpleName(); String annotatedValue = (String)annotation.getClass().getMethod("value").invoke(annotation); if (StringUtils.isEmpty(annotatedValue)) { return Optional.absent(); } else { return Optional.of(annotationType + " " + StringUtils.uncapitalize(annotatedValue)); } } catch (Exception ignoredException) {} } } return Optional.absent(); }