Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[netatmo] NAPresenceCameraHandlerTest uses internal I18nProviderImpl class #7949

Closed
wborn opened this issue Jun 20, 2020 · 4 comments
Closed
Labels

Comments

@wborn
Copy link
Member

wborn commented Jun 20, 2020

When you build the ported OH3 add-ons, the build fails to compile the NAPresenceCameraHandlerTest class because the I18nProviderImpl constructor changed with openhab/openhab-core#1487.

There should not be any usages of internal OHC/ESH classes in tests at all and it would be better if the build failed whenever they are used in imports.

Instead the NAPresenceCameraHandlerTest should use the TimeZoneProvider interface and use it with a mock for instance.

Can you have a look at this @Novanic? This import was added in #7927.

@wborn wborn added the test label Jun 20, 2020
@Novanic
Copy link
Contributor

Novanic commented Jun 20, 2020

Ok, where/how can I execute the build? Is there a separated Git project?

@wborn
Copy link
Member Author

wborn commented Jun 20, 2020

You can port the add-ons using this script. But I don't think there's any need. Just remove the I18nProviderImpl from the imports and use something that implements the TimeZoneProvider instead. If that builds with OH2 it should also work with OH3. :-)

@Novanic
Copy link
Contributor

Novanic commented Jun 20, 2020

Ok, thank you for the fast feedback.

The pull-request is now created, see #7954

@wborn
Copy link
Member Author

wborn commented Jun 20, 2020

Thanks it works!

@wborn wborn closed this as completed Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants