Skip to content

Could I get an example of FragmentTest with viewModel injected instead of mocked? #2

@di0n0s

Description

@di0n0s

Hi,

First of all, thank you very much for this repository. It´s very didactic and helps a lot to understand Android development with Jetpack.

I´m trying to testing one of my fragment without mocking viewModel because I need to do an acceptance test but I don't know why viewModel is not injecting. I think because I must setup dagger ready to use on espresso testing.

How would you setup your project to inject dependencies on espresso tests? Could I get an example of your "VideoListFragmentTest" with viewModel injected instead of mocked on a branch?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions