.. (לתיקייה המכילה) | ||
Say A has a method foo, and B extends A. If foo is (for example) annotated with @OOPBefore, and B overrides foo, will B::foo have the same annotation? | |
Yes. An annotation will be re-written in overriding methods as well. Also, it will be the same annotation - @OOPBefore in the parent will not become @OOPSetup in the child. |
Can @OOPBefore, @OOPAfter, @OOPSetup be private? | |
No. They will all be public. |
Should the access modifier be restored after setting setAccessible(true)? | |
No. |
What should I do if a Before/After fail? | |
As in the PDF, you should restore the object, stop running the current test, return OOPResult.Error, and continue to the next test. |
What should I do if passed tag="" in runClass? | |
You can assume this won't be checked. |
Can a parent and child both have a test with the same order (in case of ORDERED)? | |
No. You can assume this won't be checked. |
What should we do if the tag sent to runClass is null? | |
You should throw IllegalArgumentException. |
Please note that the tag sent to runClass, should EXACTLY equal the tag of the tests that should be run (as opposed to being a substring). | |
. |
Should the tag passed to runClass be a substring of the one in the annotation, or should it equal exactly? | |
It should equal exactly. |