Package org.easymock.internal
Class InjectionPlan
java.lang.Object
org.easymock.internal.InjectionPlan
Container for mock injections and test subject injection targets.
- Since:
- 3.3
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInjection
(Injection injection) Add anInjection
to this container.void
Add a field that should be treated as a test subject injection target.private void
blockDuplicateQualifiers
(String qualifier) Get all injections having fieldName qualifiers.Get fields identified as test subjects to which injection of mocks should be attempted.Get all injections that do not have fieldName qualifiers.
-
Field Details
-
testSubjectFields
-
qualifiedInjections
-
unqualifiedInjections
-
qualifiers
-
-
Constructor Details
-
InjectionPlan
public InjectionPlan()
-
-
Method Details
-
addInjection
Add anInjection
to this container. It will be managed according to the presence of a fieldName qualifier, and attempting to add an Injection with a duplicate fieldName qualifier will cause an error.- Parameters:
injection
- Injection to manage as part of this plan
-
blockDuplicateQualifiers
-
addTestSubjectField
Add a field that should be treated as a test subject injection target.- Parameters:
f
- Field representing a test subject to which injection of mocks will be attempted
-
getTestSubjectFields
Get fields identified as test subjects to which injection of mocks should be attempted.- Returns:
- fields representing test subjects
-
getQualifiedInjections
Get all injections having fieldName qualifiers.- Returns:
- list of Injections having fieldName qualifiers
-
getUnqualifiedInjections
Get all injections that do not have fieldName qualifiers.- Returns:
- list of Injections that do not have fieldName qualifiers.
-