• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_MOCK_ANS_MANAGER_STUB_H
17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_MOCK_ANS_MANAGER_STUB_H
18 
19 #include "gmock/gmock.h"
20 
21 #include "ans_log_wrapper.h"
22 #include "ans_manager_stub.h"
23 
24 namespace OHOS {
25 namespace Notification {
26 class MockAnsManagerStub : public AnsManagerStub {
27 public:
28 
29     std::string GetCmd();
30     std::string GetBundle();
31     int32_t GetUserId();
32 
33     /**
34      * @brief Obtains specific datas via specified dump option.
35      *
36      * @param cmd Indicates the specified dump command.
37      * @param bundle Indicates the specified bundle name.
38      * @param userId Indicates the specified userId.
39      * @param dumpInfo Indicates the container containing datas.
40      * @return Returns check result.
41      */
42     virtual ErrCode ShellDump(const std::string &cmd, const std::string &bundle, int32_t userId,
43         std::vector<std::string> &dumpInfo) override;
44 
45 private:
46     std::string cmd_;
47     std::string bundle_;
48     int32_t userId_;
49 };
50 }  // namespace EventFwk
51 }  // namespace OHOS
52 
53 #endif  // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_MOCK_ANS_MANAGER_STUB_H
54