1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef BASE_LOCATION_MOCK_I_REMOTE_OBJECT_H
17#define BASE_LOCATION_MOCK_I_REMOTE_OBJECT_H
18
19#include "gmock/gmock.h"
20
21#include "iremote_broker.h"
22#include "iremote_object.h"
23
24namespace OHOS {
25namespace Location {
26class MockIRemoteObject : public IRemoteObject {
27public:
28    MockIRemoteObject() : IRemoteObject(u"mock_i_remote_object") {}
29    ~MockIRemoteObject() {}
30    MOCK_METHOD(int, SendRequest, (uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option));
31    MOCK_METHOD(bool, IsProxyObject, (), (const, override));
32    MOCK_METHOD(bool, CheckObjectLegality, (), (const, override));
33    MOCK_METHOD(bool, AddDeathRecipient, (const sptr<DeathRecipient> &recipient), (override));
34    MOCK_METHOD(bool, RemoveDeathRecipient, (const sptr<DeathRecipient> &recipient), (override));
35    MOCK_METHOD(bool, Marshalling, (Parcel &parcel), (const, override));
36    MOCK_METHOD(sptr<IRemoteBroker>, AsInterface, (), (override));
37    MOCK_METHOD(int, Dump, (int fd, const std::vector<std::u16string> &args), (override));
38    MOCK_METHOD(int32_t, GetObjectRefCount, (), (override));
39
40    std::u16string GetObjectDescriptor() const
41    {
42        std::u16string descriptor = std::u16string();
43        return descriptor;
44    }
45};
46} // namespace Location
47} // namespace OHOS
48#endif
49