sitegeist / Sitegeist.LostInTranslation

Automatic Translations for Neos via DeeplApi
GNU General Public License v3.0
9 stars 9 forks source link

CHORE: Refactor code as a result of testing #38

Closed gradinarufelix closed 3 months ago

gradinarufelix commented 7 months ago

As a result of my unit and functional testing, I extracted some code.

For the DeepLAuthenticationKey I switched to a factory approach, to make mocking easier.

The IgnoredTermsUtility is also an extracted class which can now be tested with its own unit test.

In DeepLTranslationService, the actual request and request browser creation is extracted into separate methods to improve testability. Moreover, getEntryIdentifier() is converted into a static method.