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
{{ message }}
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
We use Spring Boot for our back-end, and based on the active profile (dev, qa, prod) we would need to either send real notification or fake it.
I saw your UnitTests and the way you mock WebServer, however, with the mock server, u manually created retrofit object with custom BASE_URL to mock WebServer and later u use raw ExpoPushService instead of ExpoPushClient
First of all your unit tests missing some coverage of actual ExpoPushClient (for example how u handle the response in case isSuccessful or failure)
Secondly, such an approach is not nicely working for dynamic beans which are based on profiles.
In real code we use ExpoPushClient not raw ExpoPushService therefore there must be an option to create ExpoPushClient object with mock WebServer and custom BASE_URL, that would allow to set up dynamic been based on the profile (mock for DEV profile and real for QA and PROD)
However, right now in ExpoPushClient the BASE_URL, retrofit and service are private static final and cannot be modified nicely.
The text was updated successfully, but these errors were encountered:
Hi
We use Spring Boot for our back-end, and based on the active profile (dev, qa, prod) we would need to either send real notification or fake it.
I saw your UnitTests and the way you mock WebServer, however, with the mock server, u manually created
retrofit
object with customBASE_URL
to mock WebServer and later u use rawExpoPushService
instead ofExpoPushClient
First of all your unit tests missing some coverage of actual
ExpoPushClient
(for example how u handle the response in caseisSuccessful
or failure)Secondly, such an approach is not nicely working for dynamic beans which are based on profiles.
In real code we use
ExpoPushClient
not rawExpoPushService
therefore there must be an option to createExpoPushClient
object with mock WebServer and customBASE_URL
, that would allow to set up dynamic been based on the profile (mock for DEV profile and real for QA and PROD)However, right now in
ExpoPushClient
theBASE_URL
,retrofit
andservice
areprivate static final
and cannot be modified nicely.The text was updated successfully, but these errors were encountered: