You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Henry Kuijpers (Jira)" <ji...@apache.org> on 2021/02/11 18:51:00 UTC
[jira] [Commented] (SLING-10138) OSGi Mocks MockConfigurationAdmin
fails to declare exception types (like the interface does)
[ https://issues.apache.org/jira/browse/SLING-10138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283299#comment-17283299 ]
Henry Kuijpers commented on SLING-10138:
----------------------------------------
Provided a PR here https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/7
WDYT [~sseifert]?
> OSGi Mocks MockConfigurationAdmin fails to declare exception types (like the interface does)
> --------------------------------------------------------------------------------------------
>
> Key: SLING-10138
> URL: https://issues.apache.org/jira/browse/SLING-10138
> Project: Sling
> Issue Type: New Feature
> Components: Testing
> Affects Versions: Testing OSGi Mock 3.0.0
> Reporter: Henry Kuijpers
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> ConfigurationAdmin specifies a listConfigurations-method, which can throw IOException and InvalidSyntaxException. However, the MockConfigurationAdmin implementation does not define them.
> While this is technically allowed an OK (builds succeed), it poses a problem when trying to do mocking and/or spying on such objects: In my use-case I needed to provide an implementation for the listConfigurations-method, for which MockConfigurationAdmin is throwing an UnsupportedOperationException.
> I think it is maybe a good idea to also implement some of the other methods, also.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)