Class ControlPanelPropertyResolutionListener
java.lang.Object
io.micronaut.testresources.controlpanel.ControlPanelPropertyResolutionListener
- All Implemented Interfaces:
PropertyResolutionListener
@Singleton
public class ControlPanelPropertyResolutionListener
extends Object
implements PropertyResolutionListener
This resolution listener will record all properties resolved by a test
resource, so that we can display the resolved values in the appropriate
cards.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
A property resolution.static final record
A property resolution error. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
errored
(String property, TestResourcesResolver resolver, Throwable exception) Records an error which happened during property resolution, for example if a container fails to start.Returns the resolutions performed by a particular resolver.findByResolver
(TestResourcesResolver resolver) Returns the resolutions performed by a particular resolver.findErrorsById
(String id) Returns the resolutions performed by a particular resolver.void
resolved
(String property, String resolvedValue, TestResourcesResolver resolver, Map<String, Object> properties, Map<String, Object> testResourcesConfig) Records that a property was resolved by a particular resolver.
-
Constructor Details
-
ControlPanelPropertyResolutionListener
public ControlPanelPropertyResolutionListener()
-
-
Method Details
-
resolved
public void resolved(String property, String resolvedValue, TestResourcesResolver resolver, Map<String, Object> properties, Map<String, Object> testResourcesConfig) Description copied from interface:PropertyResolutionListener
Records that a property was resolved by a particular resolver.- Specified by:
resolved
in interfacePropertyResolutionListener
- Parameters:
property
- the property which was resolvedresolvedValue
- the result of the resolutionresolver
- the resolver which resolved the propertyproperties
- the properties used for resolutiontestResourcesConfig
- the test resources configuration
-
errored
Description copied from interface:PropertyResolutionListener
Records an error which happened during property resolution, for example if a container fails to start.- Specified by:
errored
in interfacePropertyResolutionListener
- Parameters:
property
- the property which we attempted to resolveresolver
- the resolver which failedexception
- the error which happened
-
findByResolver
public List<ControlPanelPropertyResolutionListener.Resolution> findByResolver(TestResourcesResolver resolver) Returns the resolutions performed by a particular resolver.- Parameters:
resolver
- the resolver- Returns:
- the resolutions
-
findById
Returns the resolutions performed by a particular resolver.- Parameters:
id
- the resolver id- Returns:
- the resolutions
-
findErrorsById
Returns the resolutions performed by a particular resolver.- Parameters:
id
- the resolver id- Returns:
- the resolutions
-