Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to mock Fuel behavior in v3 #859

Open
dalewking opened this issue Apr 18, 2023 · 1 comment
Open

Make it easier to mock Fuel behavior in v3 #859

dalewking opened this issue Apr 18, 2023 · 1 comment

Comments

@dalewking
Copy link

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.

@iNoles
Copy link
Collaborator

iNoles commented May 16, 2024

Should this to be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants