fuel icon indicating copy to clipboard operation
fuel copied to clipboard

Make it easier to mock Fuel behavior in v3

Open dalewking opened this issue 1 year ago • 1 comments

For testing purposes one needs to set Fuel up to mock the behavior. You do provide:

    public fun setHttpLoader(loader: HttpLoader)
    public fun setHttpLoader(factory: HttpLoaderFactory)

But those are kind of unusable, since they are all about HttpLoader, which is an actual/expect class and is final so it is not possible to actually create a custom version of HttpLoader.

HttpLoader needs to be an interface. It would be cleaner you instead created a global val defaultHttpLoader that was expect/actual rather than trying to have an expect actual class.

dalewking avatar Apr 18 '23 18:04 dalewking

Should this to be closed?

iNoles avatar May 16 '24 17:05 iNoles