public class BeanInstanceMapFixture extends Object
BeanInstanceMap
with useful entries for testing, and associates it with bean
creation.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 ImageMetadataReader |
ensureImageMetadataReader()
Ensure a
ImageMetadataReader instance exists in the underlying BeanInstanceMap . |
static Interpolator |
ensureInterpolator()
Ensure a
Interpolator instance exists in the underlying BeanInstanceMap . |
static Interpolator |
ensureInterpolator(Interpolator interpolator)
Ensure a
Interpolator instance exists in the underlying BeanInstanceMap . |
static StackDisplayer |
ensureStackDisplayer()
Ensure a
StackDisplayer instance exists in the underlying BeanInstanceMap . |
static StackReader |
ensureStackReader()
Ensure a
StackReader instance exists in the underlying BeanInstanceMap . |
static StackWriter |
ensureStackWriter(boolean tiff)
Ensure a
StackWriter instance exists in the underlying BeanInstanceMap . |
static void |
removeStackWriter()
Removes any
StackWriter that may exist. |
public static StackReader ensureStackReader()
StackReader
instance exists in the underlying BeanInstanceMap
.public static StackWriter ensureStackWriter(boolean tiff)
StackWriter
instance exists in the underlying BeanInstanceMap
.
This leaves a global side-affect after being used, which may affect subsequent tests run in the same maven unit.
tiff
- if true, TIFFs are created, otherwise PNGs.public static void removeStackWriter()
StackWriter
that may exist.public static ImageMetadataReader ensureImageMetadataReader()
ImageMetadataReader
instance exists in the underlying BeanInstanceMap
.public static Interpolator ensureInterpolator()
Interpolator
instance exists in the underlying BeanInstanceMap
.public static Interpolator ensureInterpolator(Interpolator interpolator)
Interpolator
instance exists in the underlying BeanInstanceMap
.interpolator
- the interpolator to add, if necessary.public static StackDisplayer ensureStackDisplayer()
StackDisplayer
instance exists in the underlying BeanInstanceMap
.public static <T extends AnchorBean<?>> T check(T bean)
T
- bean-typebean
- bean to check.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.