You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any test cases requiring the geary engine need to call this test method or implement something similar.
This should be exposed.
Additionally, the fact that using a manually constructed concrete implementation of the geary engine requires a service provider is kind of silly. This should be refactored away.
The text was updated successfully, but these errors were encountered:
This was essentially done because accessing the Engine class directly is the intended way in code. Beyond reworking everything to use DI this service method is the only thing we can do.
It may be the intended way in code, but this isn't what a unit test is for. You should test using the constructed instance.
When you want to test that the Engine getter is working as intended, you should make a test for that class instead. There is some overlap in my complaints here from #52.
If for some reason this is impossible (which it really shouldn't be) then the setEngineServiceProvider testing utility should be made public as it seems that it is completely required for testing anything.
I tested this just now with my own unit tests, and they fail unless the provider is set up. This is very confusing. The engine service provider looks like it is part of the API to expose the engine to say for example paper users. It shouldn't be something relied on by the engine itself.
Right now if I construct two engines, only the one registered in the service provider is actually usable.
Any test cases requiring the geary engine need to call this test method or implement something similar.
This should be exposed.
Additionally, the fact that using a manually constructed concrete implementation of the geary engine requires a service provider is kind of silly. This should be refactored away.
The text was updated successfully, but these errors were encountered: