private boolean hasCorrectCategoryAnnotation(Description description) { List<Class<?>> categories = categories(description); if (categories.isEmpty()) { return fIncluded == null; } for (Class<?> each : categories) { if (fExcluded != null && fExcluded.isAssignableFrom(each)) { return false; } } for (Class<?> each : categories) { if (fIncluded == null || fIncluded.isAssignableFrom(each)) { return true; } } return false; }
private boolean hasCorrectCategoryAnnotation(Description description) { final Set<Class<?>> childCategories= categories(description); // If a child has no categories, immediately return. if (childCategories.isEmpty()) { return included.isEmpty(); } if (!excluded.isEmpty()) { if (excludedAny) { if (matchesAnyParentCategories(childCategories, excluded)) { return false; } } else { if (matchesAllParentCategories(childCategories, excluded)) { return false; } } } if (included.isEmpty()) { // Couldn't be excluded, and with no suite's included categories treated as should run. return true; } else { if (includedAny) { return matchesAnyParentCategories(childCategories, included); } else { return matchesAllParentCategories(childCategories, included); } } }
private boolean hasCorrectCategoryAnnotation(Description description) { List<Class<?>> categories = categories(description); if (categories.isEmpty()) { return fIncluded == null; } for (Class<?> each : categories) { if (fExcluded != null && fExcluded.isAssignableFrom(each)) { return false; } } for (Class<?> each : categories) { if (fIncluded == null || fIncluded.isAssignableFrom(each)) { return true; } } return false; }
private boolean hasCorrectCategoryAnnotation(Description description) { final Set<Class<?>> childCategories= categories(description); // If a child has no categories, immediately return. if (childCategories.isEmpty()) { return included.isEmpty(); } if (!excluded.isEmpty()) { if (excludedAny) { if (matchesAnyParentCategories(childCategories, excluded)) { return false; } } else { if (matchesAllParentCategories(childCategories, excluded)) { return false; } } } if (included.isEmpty()) { // Couldn't be excluded, and with no suite's included categories treated as should run. return true; } else { if (includedAny) { return matchesAnyParentCategories(childCategories, included); } else { return matchesAllParentCategories(childCategories, included); } } }
private boolean hasCorrectCategoryAnnotation(Description description) { final Set<Class<?>> childCategories= categories(description); // If a child has no categories, immediately return. if (childCategories.isEmpty()) { return included.isEmpty(); } if (!excluded.isEmpty()) { if (excludedAny) { if (matchesAnyParentCategories(childCategories, excluded)) { return false; } } else { if (matchesAllParentCategories(childCategories, excluded)) { return false; } } } if (included.isEmpty()) { // Couldn't be excluded, and with no suite's included categories treated as should run. return true; } else { if (includedAny) { return matchesAnyParentCategories(childCategories, included); } else { return matchesAllParentCategories(childCategories, included); } } }
private boolean hasCorrectCategoryAnnotation(Description description) { List<Class<?>> categories = categories(description); if (categories.isEmpty()) { return fIncluded == null; } for (Class<?> each : categories) { if (fExcluded != null && fExcluded.isAssignableFrom(each)) { return false; } } for (Class<?> each : categories) { if (fIncluded == null || fIncluded.isAssignableFrom(each)) { return true; } } return false; }
private boolean hasCorrectCategoryAnnotation(Description description) { List<Class<?>> categories = categories(description); if (categories.isEmpty()) { return fIncluded == null; } for (Class<?> each : categories) { if (fExcluded != null && fExcluded.isAssignableFrom(each)) { return false; } } for (Class<?> each : categories) { if (fIncluded == null || fIncluded.isAssignableFrom(each)) { return true; } } return false; }