Package com.tngtech.jgiven.impl.inject
Class ValueInjector
java.lang.Object
com.tngtech.jgiven.impl.inject.ValueInjector
Used by Scenario to inject and read values from objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voidinjectValueByName(String name, T value) <T> voidinjectValueByType(Class<T> clazz, T value) voidreadValues(Object object) voidupdateValues(Object object) voidvalidateFields(Object object)
-
Constructor Details
-
ValueInjector
public ValueInjector()
-
-
Method Details
-
validateFields
- Throws:
AmbiguousResolutionException- when multiple fields with the same resolution exist in the given object
-
readValues
- Throws:
JGivenMissingGuaranteedScenarioStateException- in case a field is guaranteed and is not initialized by the finishing stage
-
updateValues
- Throws:
JGivenMissingRequiredScenarioStateException- in case a field requires a value and the value is not present
-
injectValueByType
-
injectValueByName
-