Annotation Type Test


@Retention(RUNTIME) @Target(METHOD) public @interface Test
Annotation for test procedures. A test procedure should be public but not static. The test procedure's name doesn't have to start with "test" but that is strongly recommended for the sake of clarity, especially for tests of overridden functions like equals().

I'm aware that in JUnit 5 test procedures can be package private. If we want to enable that, it could be done, it's probably a matter of making changes to the test runner. But I prefer not to run roughshod over access levels if it's not absolutely necessary.

I'm also aware that in TestNG the test annotation can be applied to the whole test class, in which case an individual test procedure doesn't need the annotation, unless it needs a timeout or expected exceptions attribute. I'm open to the idea of making this annotation assignable at the class level.

In this testing framework, this annotation doesn't have any attributes and I don't think those will be necessary. Use Asserters.assertTimeout(org.testframe.api.Procedure, java.time.Duration, java.lang.String) or Asserters.assertThrows(org.testframe.api.Procedure, java.lang.Class<E>).

Since:
1.0
Author:
Alonso del Arte