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

add androidTest code. #17

Merged
merged 1 commit into from
Feb 20, 2022
Merged

add androidTest code. #17

merged 1 commit into from
Feb 20, 2022

Conversation

LeoAndo
Copy link
Owner

@LeoAndo LeoAndo commented Feb 20, 2022

close #16

serializer = PersonPreferencesSerializer,
scope = scope
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scopeのデフォルト値は以下の通り
スクリーンショット 2022-02-20 21 45 24

@ApplicationContext context: Context,
@IoCoroutineScope scope: CoroutineScope
): PersonDataStore =
PersonDataStore(context, scope, "person_prefs.pb")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コンストラクタにdatastoreファイル名, CoroutineScopeを渡すことで、テストコードをかける仕組みにしておく

@LeoAndo LeoAndo merged commit 8d66126 into main Feb 20, 2022
@LeoAndo LeoAndo deleted the create_test_code branch February 20, 2022 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test codeの作成(proto dataStore)
1 participant