Represents a contract for annotations, which serves as argument lists provider for parametrized tests.
These annotations are used on function and are resolved during execution. Basic implementation is
annotation parameters()
, but custom implementation can be very easily implemented,
see example below.
Example:
shared annotation DataFileAnnotation dataFile(String fileName) => DataFileAnnotation(fileName); shared final annotation class DataFileAnnotation(String fileName) satisfies OptionalAnnotation<DataFileAnnotation,FunctionDeclaration> & ArgumentListProvider { shared actual {Anything[]*} argumentLists(ArgumentProviderContext context) => CsvFileParser(fileName).parse(); } test dataFile("people.csv") shared void shouldProcessPerson(String firstname, String surname, Integer age) { ... }
no type hierarchy
no supertypes hierarchy
Methods | |
argumentLists | Source Codeshared formal {Anything[]*} argumentLists(ArgumentProviderContext context) Returns arguments lists. |
Inherited Methods |
Methods inherited from: Object |