okta / samples-android

samples-android
https://github.com/okta/samples-android
Apache License 2.0
37 stars 52 forks source link

Refactor totp sample update handling #92

Closed rajdeepnanua-okta closed 1 year ago

rajdeepnanua-okta commented 1 year ago

Previously, test-specific code was added to OtpDisplayViewModel to make it possible to unit test totp refresh behavior. This PR refactors that to remove all test specific code in OtpDisplayViewModel, and instead delegates update signals to TickerFlowFactory. Unit tests provide their own version of TickerFlowFactory for testing.