1 /*
2  * Copyright (c) 2021-2023 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 MOC_APPDOMAINVERIFY_AGENT_STUB_MOCK_H
17 #define MOC_APPDOMAINVERIFY_AGENT_STUB_MOCK_H
18 #include <gmock/gmock.h>
19 #include <iremote_object.h>
20 #include <iremote_stub.h>
21 #include "i_app_domain_verify_agent_service.h"
22 #include "app_domain_verify_agent_service_proxy.h"
23 #include "app_domain_verify_agent_service_stub.h"
24 
25 namespace OHOS {
26 namespace AppDomainVerify {
27 class AppDomainVerifyAgentRemoteStubMock : public IRemoteStub<IAppDomainVerifyAgentService> {
28 public:
29     DECLARE_INTERFACE_DESCRIPTOR(u"IAppDomainVerifyAgentServiceMock");
AppDomainVerifyAgentRemoteStubMock()30     AppDomainVerifyAgentRemoteStubMock()
31     {
32         printf("AppDomainVerifyAgentRemoteStubMock \n");
33     };
~AppDomainVerifyAgentRemoteStubMock()34     virtual ~AppDomainVerifyAgentRemoteStubMock()
35     {
36         printf("~AppDomainVerifyAgentRemoteStubMock \n");
37     };
SingleVerify(const AppVerifyBaseInfo & appVerifyBaseInfo,const VerifyResultInfo & verifyResultInfo)38     virtual void SingleVerify(
39         const AppVerifyBaseInfo& appVerifyBaseInfo, const VerifyResultInfo &verifyResultInfo) override
40     {
41     }
ConvertToExplicitWant(OHOS::AAFwk::Want & implicitWant,sptr<IConvertCallback> & callback)42     virtual void ConvertToExplicitWant(OHOS::AAFwk::Want& implicitWant, sptr<IConvertCallback>& callback) override
43     {
44     }
45     MOCK_METHOD4(SendRequest, int(uint32_t, MessageParcel&, MessageParcel&, MessageOption&));
46     MOCK_METHOD(sptr<IRemoteObject>, AsObject, (), (override));
47 };
48 
49 class AppDomainVerifyAgentStubMock : public AppDomainVerifyAgentServiceStub {
50 public:
AppDomainVerifyAgentStubMock()51     AppDomainVerifyAgentStubMock(){};
~AppDomainVerifyAgentStubMock()52     virtual ~AppDomainVerifyAgentStubMock(){};
SingleVerify(const AppVerifyBaseInfo & appVerifyBaseInfo,const VerifyResultInfo & verifyResultInfo)53     virtual void SingleVerify(
54         const AppVerifyBaseInfo& appVerifyBaseInfo, const VerifyResultInfo &verifyResultInfo) override
55     {
56     }
ConvertToExplicitWant(OHOS::AAFwk::Want & implicitWant,sptr<IConvertCallback> & callback)57     virtual void ConvertToExplicitWant(OHOS::AAFwk::Want& implicitWant, sptr<IConvertCallback>& callback) override
58     {
59     }
60 };
61 
62 }  // namespace AppDomainVerify
63 }  // namespace OHOS
64 
65 #endif
66