Package org.jvnet.testing.hk2mockito
Annotation Interface SC
@SC (Service Collaborator) annotation is used on fields and
methods of a Test class to inject spies of the @SUT's
collaborating services.
- Author:
- Sharmarke Aden
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionIf the collaborator service being injected is a field of the SUT, this value should indicate the name of the field.intIf the collaborator service being injected is a constructor or method parameter of the SUT, this value should indicate the index of the parameter.
-
Element Details
-
value
int valueIf the collaborator service being injected is a constructor or method parameter of the SUT, this value should indicate the index of the parameter. By default the collaborator will be detected but in instances (i.e. injecting two or more services with the same type) you may want to explicitly specify the index of the service.- Returns:
- the index of the parameter
- Default:
- 0
-
field
String fieldIf the collaborator service being injected is a field of the SUT, this value should indicate the name of the field. By default the @SC field name is used as the collaborator field name but in instances (i.e. field injection of two or more services with the same type) you may want to explicitly specify the name of the field.- Returns:
- the name of the field
- Default:
- ""
-