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
Nested ClassesModifier and TypeClassDescriptionstatic final recordA property resolution.static final recordA property resolution error. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiderrored(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.voidresolved(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:PropertyResolutionListenerRecords that a property was resolved by a particular resolver.- Specified by:
resolvedin 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:PropertyResolutionListenerRecords an error which happened during property resolution, for example if a container fails to start.- Specified by:
erroredin 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
-