1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef HARDWARE_GOOGLE_CAMERA_HAL_TESTS_MOCK_PROCESS_BLOCK_H_
18 #define HARDWARE_GOOGLE_CAMERA_HAL_TESTS_MOCK_PROCESS_BLOCK_H_
19 
20 #include <gmock/gmock.h>
21 #include <process_block.h>
22 
23 namespace android {
24 namespace google_camera_hal {
25 
26 // Defines a ProcessBlock mock using gmock.
27 class MockProcessBlock : public ProcessBlock {
28  public:
29   MOCK_METHOD2(ConfigureStreams,
30                status_t(const StreamConfiguration& stream_config,
31                         const StreamConfiguration& overall_config));
32 
33   MOCK_METHOD1(SetResultProcessor,
34                status_t(std::unique_ptr<ResultProcessor> result_processor));
35 
36   MOCK_CONST_METHOD1(GetConfiguredHalStreams,
37                      status_t(std::vector<HalStream>* hal_streams));
38 
39   MOCK_METHOD2(
40       ProcessRequests,
41       status_t(const std::vector<ProcessBlockRequest>& process_block_requests,
42                const CaptureRequest& remaining_session_request));
43 
44   MOCK_METHOD0(Flush, status_t());
45 };
46 
47 }  // namespace google_camera_hal
48 }  // namespace android
49 
50 #endif  // HARDWARE_GOOGLE_CAMERA_HAL_TESTS_MOCK_PROCESS_BLOCK_H_