|
| 1 | +package org.reactivestreams.tck; |
| 2 | + |
| 3 | +import java.lang.annotation.ElementType; |
| 4 | +import java.lang.annotation.Retention; |
| 5 | +import java.lang.annotation.RetentionPolicy; |
| 6 | +import java.lang.annotation.Target; |
| 7 | + |
| 8 | +public class Annotations { |
| 9 | + private Annotations() {} |
| 10 | + |
| 11 | + /** |
| 12 | + * Used to mark tests for specification rules which were currently impossible to be implemented. |
| 13 | + * For example tests like "Publisher SHOULD consider Subscription as ..." - is inherently hard to specifically test. |
| 14 | + */ |
| 15 | + @Target(ElementType.METHOD) |
| 16 | + @Retention(RetentionPolicy.SOURCE) |
| 17 | + static @interface NotVerified { |
| 18 | + } |
| 19 | + |
| 20 | + /** |
| 21 | + * Used to mark tests that MUST pass in all (even very restricted types of) Publishers / Subscribers. |
| 22 | + */ |
| 23 | + @Target(ElementType.METHOD) |
| 24 | + @Retention(RetentionPolicy.SOURCE) |
| 25 | + static @interface Required { |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * Used to mark tests which may be skipped / not implemented by certain implementations. |
| 30 | + * These tests can be skipped by returning null from the given factory method. |
| 31 | + */ |
| 32 | + @Target(ElementType.METHOD) |
| 33 | + @Retention(RetentionPolicy.SOURCE) |
| 34 | + @interface Additional { |
| 35 | + /** Description of situation when it's OK to not pass this test */ |
| 36 | + String value() default ""; |
| 37 | + |
| 38 | + /** Name of the method to be implemented (returning <em>not</em> {@code null}) if this test should be run. */ |
| 39 | + String implement() default ""; |
| 40 | + } |
| 41 | + |
| 42 | +} |
0 commit comments