public class BeanTestChecker extends Object
Additionally wraps the exceptions thrown in AnchorFriendlyRuntimeException
to make
tests more readable, rather than having too many different checked exception types in the test
code, for non-operational failures.
Modifier and Type | Method and Description |
---|---|
static <T extends AnchorBean<?>> |
check(T bean)
Checks if a bean has all necessary items, throwing a run-time exception if it does not.
|
static <T extends InitializableBean<?,P>,P extends BeanInitialization> |
checkAndInit(T bean,
P initialization,
Logger logger)
Checks if a bean has all necessary items as with
check(T) and also initializes the
bean. |
public static <T extends AnchorBean<?>> T check(T bean)
T
- bean-typebean
- bean to checkpublic static <T extends InitializableBean<?,P>,P extends BeanInitialization> T checkAndInit(T bean, P initialization, Logger logger)
check(T)
and also initializes the
bean.T
- bean-typeP
- initialization-parameters-type accepted by the beanbean
- the bean to check and initialize.initialization
- initialization-parameters.logger
- the logger.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.