1 /*
2  * Copyright (C) 2022 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 CPP_EVS_MANAGER_1_1_TEST_UNIT_MOCKULTRASONICSARRAY_H_
18 #define CPP_EVS_MANAGER_1_1_TEST_UNIT_MOCKULTRASONICSARRAY_H_
19 
20 #include <android/hardware/automotive/evs/1.1/IEvsUltrasonicsArray.h>
21 #include <gmock/gmock.h>
22 #include <gtest/gtest.h>
23 
24 namespace android::automotive::evs::V1_1::implementation {
25 
26 class MockUltrasonicsArray :
27       public ::android::hardware::automotive::evs::V1_1::IEvsUltrasonicsArray {
28 public:
29     virtual ~MockUltrasonicsArray() = default;
30 
31     MOCK_METHOD(bool, isRemote, (), (const, override));
32     MOCK_METHOD(::android::hardware::Return<void>, getUltrasonicArrayInfo,
33                 (getUltrasonicArrayInfo_cb), (override));
34     MOCK_METHOD(::android::hardware::Return<::android::hardware::automotive::evs::V1_0::EvsResult>,
35                 setMaxFramesInFlight, (uint32_t), (override));
36     MOCK_METHOD(::android::hardware::Return<::android::hardware::automotive::evs::V1_0::EvsResult>,
37                 startStream,
38                 (const ::android::sp<
39                         ::android::hardware::automotive::evs::V1_1::IEvsUltrasonicsArrayStream>&),
40                 (override));
41     MOCK_METHOD(::android::hardware::Return<void>, stopStream, (), (override));
42     MOCK_METHOD(::android::hardware::Return<void>, doneWithDataFrame,
43                 (const ::android::hardware::automotive::evs::V1_1::UltrasonicsDataFrameDesc&),
44                 (override));
45     MOCK_METHOD(::android::hardware::Return<void>, interfaceChain, (interfaceChain_cb), (override));
46     MOCK_METHOD(::android::hardware::Return<void>, debug,
47                 (const ::android::hardware::hidl_handle&,
48                  const ::android::hardware::hidl_vec<::android::hardware::hidl_string>&),
49                 (override));
50     MOCK_METHOD(::android::hardware::Return<void>, interfaceDescriptor,
51                 (IEvsUltrasonicsArray::interfaceDescriptor_cb), (override));
52     MOCK_METHOD(::android::hardware::Return<void>, getHashChain, (getHashChain_cb), (override));
53     MOCK_METHOD(::android::hardware::Return<void>, setHALInstrumentation, (), (override));
54     MOCK_METHOD(::android::hardware::Return<bool>, linkToDeath,
55                 (const ::android::sp<::android::hardware::hidl_death_recipient>&, uint64_t),
56                 (override));
57     MOCK_METHOD(::android::hardware::Return<void>, ping, (), (override));
58     MOCK_METHOD(::android::hardware::Return<void>, getDebugInfo, (getDebugInfo_cb), (override));
59     MOCK_METHOD(::android::hardware::Return<void>, notifySyspropsChanged, (), (override));
60     MOCK_METHOD(::android::hardware::Return<bool>, unlinkToDeath,
61                 (const ::android::sp<::android::hardware::hidl_death_recipient>&), (override));
62 };
63 
64 using NiceMockUltrasonicsArray = ::testing::NiceMock<MockUltrasonicsArray>;
65 
66 }  // namespace android::automotive::evs::V1_1::implementation
67 
68 #endif  //  CPP_EVS_MANAGER_1_1_TEST_UNIT_MOCKULTRASONICSARRAY_H_
69