summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorChristian Brunschen <cbrunschen@google.com>2019-06-04 14:38:06 +0100
committerChristian Brunschen <cbrunschen@google.com>2019-06-05 14:08:49 +0000
commit58bfeec99cfce42e5c5aef8a99b61f5c74801e78 (patch)
tree0f400d939513403997cbb3103df1214d94bf65aa /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent0e2fd2605a175ebef09190961accc28c68aac331 (diff)
Support handling multiple static mocks.
This CL introduces a "StaticMockFixture" interface that allows setting up the classes to be mocked in a StaticMockitoSessionBuilder and separately setting up the default behaviour of the so-mocked classes, as well as tearing them down. It also introduces a StaticMockFixtureRule that takes some number of StaticMockFixture instances or suppliers thereof, and manages them all within the same StaticMockitoSession and its builder. This in turn allows us to use such a StaticMockFixtureRule to orchestrate the automatic set-up and tear-down of different sets of static mocks, all within the same StatickMockitoSession, since juggling multiple StaticMockitoSessions turns out to be tricky and full of pitfalls. Finally this change refactors TestableDeviceConfig to become a StaticMockFixture which can then be used together with other static mocks, and to separately offer a TestableDeviceConfigRule that can be used when no other static mocks are required to manage the TestableDeviceConfig on its own. Change-Id: Icd88736390699e8956cd3d6923636afc0e015440 Test: included in CL. Bug: 129937393
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions