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

Scope SavedStateFlowHandle to ViewModel's, create assisted injection extension functions, & add CI to run unit tests and build #11

Merged
merged 6 commits into from Jan 8, 2022

Conversation

plusmobileapps
Copy link
Owner

@plusmobileapps plusmobileapps commented Jan 7, 2022

Addresses issue #10

In order to get the CI to work and build the whole project, needed to rename the packages of each sample to not conflict with the library.

@KaustubhPatange
Copy link

Can we add tests for the injection? Would it make sense?

@plusmobileapps
Copy link
Owner Author

@KaustubhPatange I was thinking about adding tests for this injection, although since Hilt is a compile time safety dependency injection framework and not runtime. I was thinking the compilation of the hilt sample would be sufficient enough as a test? Otherwise if we feel the need to test, is this possible to cover in a unit test or write an espresso test for the sample perhaps?

@plusmobileapps plusmobileapps changed the title create a savedstateflow-hilt module that automatically scopes SavedStateFlowHandle to the hilt ViewModelScope Scope SavedStateFlowHandle to ViewModel's and created assisted injection functions Jan 8, 2022
@plusmobileapps plusmobileapps changed the title Scope SavedStateFlowHandle to ViewModel's and created assisted injection functions Scope SavedStateFlowHandle to ViewModel's, create assisted injection extension functions, & add CI to run unit tests and build Jan 8, 2022
@plusmobileapps plusmobileapps merged commit b8bd0ae into main Jan 8, 2022
@plusmobileapps plusmobileapps deleted the savedstateflow-hilt branch January 8, 2022 21:20
@KaustubhPatange
Copy link

@plusmobileapps

Through the unit test, it is not possible. But I get your point a sample app if compiled through CI is more than enough to see if the injection works.

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

Successfully merging this pull request may close these issues.

None yet

2 participants