mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-25 03:57:58 +01:00
[sinttest] Add optional version to specification reference
Some specifications are versioned. XEPs, for example, typically are. It is useful to annotate an implementation with the specific version of the specification that is being tested.
This commit is contained in:
parent
1bba38decd
commit
e79934938c
2 changed files with 11 additions and 1 deletions
|
@ -179,6 +179,9 @@ public class SmackIntegrationTestFramework {
|
|||
return null;
|
||||
}
|
||||
String line = spec.document().trim();
|
||||
if (!spec.version().isBlank()) {
|
||||
line += " (version " + spec.version() + ")";
|
||||
}
|
||||
|
||||
final SmackIntegrationTest test = method.getAnnotation(SmackIntegrationTest.class);
|
||||
if (!test.section().isBlank()) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Reference to a specific part of a specification.
|
||||
* Reference to a specification document.
|
||||
*
|
||||
* @author Guus der Kinderen, guus@goodbytes.nl
|
||||
*/
|
||||
|
@ -38,4 +38,11 @@ public @interface SpecificationReference {
|
|||
* @return a document identifier
|
||||
*/
|
||||
String document();
|
||||
|
||||
/**
|
||||
* An optional version number, such as '1.2.0'.
|
||||
*
|
||||
* @return a version number
|
||||
*/
|
||||
String version() default "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue