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
Is your feature request related to a problem? Please describe. Mockinizer internally uses android.util.log in DebugLogger which makes it impossible to use this library in JUnit tests without using Robolectric.
Describe the solution you'd like
Remove android.util.Log references from this library.
Describe alternatives you've considered
There is an option to provide a custom logger, but this provision is not there for all the places where DebugLogger is used. mockinize method accepts a custom logger and I passed one there.
Still I got this error on using this library in JUnit test.
Method d in android.util.Log not mocked. See http://g.co/androidstudio/not-mocked for details.
java.lang.RuntimeException: Method d in android.util.Log not mocked. See http://g.co/androidstudio/not-mocked for details.
at android.util.Log.d(Log.java)
at com.appham.mockinizer.DebugLogger.d(Logger.kt:7)
at com.appham.mockinizer.RequestFilter$Companion.from(RequestFilter.kt:36)
at com.appham.mockinizer.MockinizerInterceptor$intercept$1.invoke(MockinizerInterceptor.kt:20)
at com.appham.mockinizer.MockinizerInterceptor$intercept$2.invoke(MockinizerInterceptor.kt:42)
at com.appham.mockinizer.MockinizerInterceptor.intercept(MockinizerInterceptor.kt:56)
MockinizerInterceptor instance is created internally and it uses DebugLogger and there is no way to provide a custom logger there as the dependencies required to create this interceptor are not public.
A simple solution would be to use println instead of android.util.log in DebugLogger.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Mockinizer
internally usesandroid.util.log
inDebugLogger
which makes it impossible to use this library in JUnit tests without using Robolectric.Describe the solution you'd like
Remove
android.util.Log
references from this library.Describe alternatives you've considered
There is an option to provide a custom logger, but this provision is not there for all the places where
DebugLogger
is used.mockinize
method accepts a custom logger and I passed one there.Still I got this error on using this library in JUnit test.
MockinizerInterceptor
instance is created internally and it usesDebugLogger
and there is no way to provide a custom logger there as the dependencies required to create this interceptor are not public.A simple solution would be to use
println
instead ofandroid.util.log
inDebugLogger
.The text was updated successfully, but these errors were encountered: