/** * Does this class support web tests? * Test cases that support web tests need to have at least a WebDriver field annotated with the @Managed * annotation. */ public static boolean supportsWebTests(Class clazz) { return hasManagedWebdriverField(clazz); }
public static boolean isIgnored(final Method method) { if (method != null) { return hasAnnotationCalled(method, "Ignore"); } return false; }
private String getSpecifiedDriver(Class<?> klass) { if (ManagedWebDriverAnnotatedField.hasManagedWebdriverField(klass)) { return ManagedWebDriverAnnotatedField.findFirstAnnotatedField(klass).getDriver(); } else { return null; } }
/** * Find the first field in the class annotated with the <b>Managed</b> annotation. */ public static ManagedWebDriverAnnotatedField findFirstAnnotatedField(final Class<?> testClass) { Optional<ManagedWebDriverAnnotatedField> optionalField = findOptionalAnnotatedField(testClass); if (optionalField.isPresent()) { return optionalField.get(); } else { throw new InvalidManagedWebDriverFieldException(NO_ANNOTATED_FIELD_ERROR); } }
public static boolean isUniqueSession(Class<?> testClass) { ManagedWebDriverAnnotatedField webDriverField = ManagedWebDriverAnnotatedField.findFirstAnnotatedField(testClass); return webDriverField.isUniqueSession(); }
public boolean isIgnored() { return TestAnnotations.isIgnored(method); } }
public static boolean shouldClearCookiesBeforeEachTestIn(Class<?> testClass) { ManagedWebDriverAnnotatedField webDriverField = findFirstAnnotatedField(testClass); return webDriverField.getClearCookiesPolicy() == ClearCookiesPolicy.BeforeEachTest; }
@Step public void doSomeOtherThing() { stepRunCount++; } }
/** * Return a list of the issues mentioned in the Issue annotation of this method. * @param methodName the name of the test method in the Java test class, if applicable. * returns */ public Optional<String> getAnnotatedIssueForMethod(String methodName) { return getAnnotatedIssue(methodName); }
public Methods called(String name) { currentResults = filterByName(currentResults, name); return this; }
/** * Find the first field in the class annotated with the <b>Managed</b> annotation. */ public static ManagedWebDriverAnnotatedField findFirstAnnotatedField(final Class<?> testClass) { Optional<ManagedWebDriverAnnotatedField> optionalField = findOptionalAnnotatedField(testClass); if (optionalField.isPresent()) { return optionalField.get(); } else { throw new InvalidManagedWebDriverFieldException(NO_ANNOTATED_FIELD_ERROR); } }
public boolean isIgnored() { return TestAnnotations.isIgnored(method); } }
/** * Does this class support web tests? * Test cases that support web tests need to have at least a WebDriver field annotated with the @Managed * annotation. */ public static boolean supportsWebTests(Class clazz) { return ManagedWebDriverAnnotatedField.hasManagedWebdriverField(clazz); }
/** * Return a list of the issues mentioned in the Issue annotation of this method. * @param methodName the name of the test method in the Java test class, if applicable. * returns */ public Optional<String> getAnnotatedIssueForMethod(String methodName) { return getAnnotatedIssue(methodName); }
public static boolean isIgnored(final Method method) { if (method != null) { return hasAnnotationCalled(method, "Ignore"); } return false; }
/** * Find the first field in the class annotated with the <b>Managed</b> annotation. */ public static ManagedWebDriverAnnotatedField findFirstAnnotatedField(final Class<?> testClass) { Optional<ManagedWebDriverAnnotatedField> optionalField = findOptionalAnnotatedField(testClass); if (optionalField.isPresent()) { return optionalField.get(); } else { throw new InvalidManagedWebDriverFieldException(NO_ANNOTATED_FIELD_ERROR); } }
/** * Does this class support web tests? * Test cases that support web tests need to have at least a WebDriver field annotated with the @Managed * annotation. */ public static boolean supportsWebTests(Class clazz) { return ManagedWebDriverAnnotatedField.hasManagedWebdriverField(clazz); }
/** * Return a list of the issues mentioned in the Issue annotation of this method. * @param methodName the name of the test method in the Java test class, if applicable. * returns */ public Optional<String> getAnnotatedIssueForMethod(String methodName) { return getAnnotatedIssue(methodName); }