summaryrefslogtreecommitdiff
path: root/java/tests/AndroidTest.xml
diff options
context:
space:
mode:
author Joshua Trask <joshtrask@google.com> 2022-11-29 13:34:21 -0500
committer Joshua Trask <joshtrask@google.com> 2022-12-16 14:40:24 +0000
commit6e627be666fe43a9f13559856e158196d8ed7f4e (patch)
tree3ca9bd0dfa729730245a51f0db31d1a2c860b8a5 /java/tests/AndroidTest.xml
parent92160d6e9fb1caa1142599ee252f53b796298be5 (diff)
Extract TargetPresentationGetter hierarchy
These were inner classes of `ResolverListAdapter`, even though they're neither really related to the core responsibilities of that class, nor used exclusively in the implementation of that class (i.e., they're public APIs with clients in unrelated components of the app). This CL pulls the abstract base class (along with the two implementations) to a new component, and builds out comprehensive unit tests that address more edge-cases than the existing coverage in `ResolverActivityTest`. There are still opportunities to simplify the logic in the `TargetPresentationGetter` implementations, but this CL leaves the code roughly as-is so we can check in the unit test coverage in advance of any more significant refactorings. This CL: * Pulls the two implementations to static inner classes of their base class (the newly-non-inner-class) `TargetPresentationGetter`. * Introduces a new `TargetPresentationGetter.Factory` component to encapsulate the type-based overloads that were previously part of the `ResolverListAdapter` API. * Reworks client/test code to make calls in terms of the generic `TargetPresentationGetter` interface, then tightens the visibility of the subclasses (now private, instantiable only through the new `Factory` API). * Expands unit test coverage of the `TargetPresentationGetter` API, and removes the legacy tests from `ResolverActivityTest`. * Makes _some_ minor readability improvements (e.g. expanding acronyms in variable names) where convenient -- not consistently. Test: atest IntentResolverUnitTests Bug: 202167050 Change-Id: I4793f1149b698ddde8b3bbaa8bf23e0d7b962ce1
Diffstat (limited to 'java/tests/AndroidTest.xml')
0 files changed, 0 insertions, 0 deletions