Closed dkozel closed 9 years ago
EnumPreferences
is written that way so MockGithubService
can have generic methods for loading/getting/setting the responses. If we change to using EnumPreference
then we'll need to instantiate one for each mock response. For u2020 this is fine since there's only one, but it quickly grows out of control as you add more endpoints (we have over 30 internally).
That's not to say that EnumPreference
is a bad idea. We have one as well, but there's no use for it right now in this project.
Would a pull request changing the implementation of EnumPreference to match that of the other typed preferences, such as StringPreference be welcome?
The proposed replacement for the class is in this gist: EnumPreference.java