devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
35 stars 101 forks source link

#895: added android-studio command #1136

Closed jan-vcapgemini closed 1 year ago

jan-vcapgemini commented 1 year ago

Addresses: #895

Implements:

jan-vcapgemini commented 1 year ago

@jan-vcapgemini thanks for your PR. You did an excellent job and this seems fully functional. 👍 Great that you even included an integration tests. Are you aware that we have fully functional integration tests here: https://github.com/devonfw/ide/tree/master/scripts/src/test/bash

Further to test more of the actual code, I would recommend that AndroidStudioUrlUpdaterMock extends AndroidStudioUrlUpdater. Therefore you need to add a protected getDownloadBaseUrl() method returning DOWNLOAD_URL that can be overridden in the mock. Otherwise, to be honest you are not really testing the behavior of this feature as you can add any bug to AndroidStudioUrlUpdater as this is not tested at all but just your Mock.

I left some comments for documentation improvement for rework. However, to signal that this is great work and functional, I review as approved as this could already be merged as is. However, I will leave it open so you can do some final polishing.

Thank you for your suggestions regarding the changes on the integration test. I've adjusted the test now. About the mentioned integration tests using bash, I've added an integration test for Android Studio too already. I just hope that my java integration test can be used as a first example demonstrating WireMock and resource friendly tests.