@Override public Annotation[] getAnnotations() { return delegatee.getAnnotations(); }
/** * Adds to {@code errors} a throwable for each problem detected. Looks for * {@code BeforeClass}, {@code AfterClass}, {@code Before} and {@code After} * annotations. * * @param method the method that is being validated * @return A list of exceptions detected * * @since 4.12 */ @Override public List<Exception> validateAnnotatedMethod(FrameworkMethod method) { List<Exception> errors = new ArrayList<Exception>(); Annotation[] annotations = method.getAnnotations(); for (Annotation annotation : annotations) { for (Class<?> clazz : INCOMPATIBLE_ANNOTATIONS) { if (annotation.annotationType().isAssignableFrom(clazz)) { addErrorMessage(errors, clazz); } } } return unmodifiableList(errors); }
@Override protected Description describeChild(FrameworkMethod method) { Description description = methodDescriptions.get(method); if (description == null) { description = Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); methodDescriptions.putIfAbsent(method, description); } return description; }
@Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
@Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
private Description describeRepeatTest(FrameworkMethod method) { int times = method.getAnnotation(Repeat.class).value(); Description description = Description.createSuiteDescription( testName(method) + " [" + times + " times]", method.getAnnotations()); for (int i = 1; i <= times; i++) { description.addChild(Description.createTestDescription( getTestClass().getJavaClass(), testName(method) + "-" + i)); } return description; }
@Override protected Description describeChild(FrameworkMethod method) { String text = testName(method) + "(" + Arrays.toString(parameterValues) + ")"; return Description.createSuiteDescription(text, method.getAnnotations()); }
@Override public Description describe(final FrameworkMethod method) { if (method == null) throw new IllegalArgumentException("Method must not be null!"); final Class<?> declaringClass = method.getMethod().getDeclaringClass(); final String methodName = method.getName(); final Annotation[] annotations = method.getAnnotations(); return Description.createTestDescription(declaringClass, methodName, annotations); } }
@Override protected Description describeChild(FrameworkMethod method) { Description description = methodDescriptions.get(method); if (description == null) { description = Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); methodDescriptions.putIfAbsent(method, description); } return description; }
@Override protected Description describeChild(FrameworkMethod method) { Description description = methodDescriptions.get(method); if (description == null) { description = Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); methodDescriptions.putIfAbsent(method, description); } return description; }
@Override public Statement apply(Statement base, FrameworkMethod method, Object fixtureTarget) { Repeat actual = method.getAnnotation(Repeat.class); if (actual == null) { return base; } Class<?> fixtureType = fixtureTarget.getClass(); Description description = Description.createTestDescription(fixtureType, method.getName(), method.getAnnotations()); return statement = onRepeat(actual, notifier, base, description); } }
@Override public Statement apply(final Statement base, final FrameworkMethod method, final Object target) { Description testDescription = Description .createTestDescription(method.getMethod().getDeclaringClass(), method.getName(), method.getAnnotations()); return this.apply(base, testDescription); }
/** * Generates a "plain" description of a burst test, with no parameter information. This should be * used only for filtering. It would not be safe for {@link #describeChild(FrameworkMethod)} to * return these plain descriptions, as then multiple tests would share the same description. */ private Description describeChildPlain(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), method.getMethod().getName(), method.getAnnotations()); } }
@Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getName(), method.getName(), method.getAnnotations()); }
@Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
@Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
/** * Overridden to avoid any caching of method description as it was interfering with the way EasyTest behaved. */ @Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
@Override protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
/** * Returns a {@link org.junit.runner.Description} for {@code child}, which can be assumed to * be an element of the list returned by {@link #getChildren()} */ protected Description describeChild(FrameworkMethod method) { return Description.createTestDescription(getTestClass().getJavaClass(), testName(method), method.getAnnotations()); }
@Override public Statement apply(Statement statement, FrameworkMethod method, Object junitClassObject) { for (Annotation annotation : method.getAnnotations()) { if (annotation.annotationType() == ExpectedBehavior.class) { ExpectedBehavior test = (ExpectedBehavior) annotation; tClass = test.expected(); break; } } return new StatementWrapper(statement); }