• 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 #include <gtest/gtest.h>
17 #include "matching_skills.h"
18 #include "string_ex.h"
19 
20 namespace OHOS {
21 namespace EventFwk {
MatchingSkills()22 MatchingSkills::MatchingSkills()
23 {}
24 
MatchingSkills(const MatchingSkills & matchingSkills)25 MatchingSkills::MatchingSkills(const MatchingSkills& matchingSkills)
26 {
27     entities_ = matchingSkills.entities_;
28     events_ = matchingSkills.events_;
29     schemes_ = matchingSkills.schemes_;
30 }
31 
~MatchingSkills()32 MatchingSkills::~MatchingSkills()
33 {}
34 
GetEntity(size_t index) const35 std::string MatchingSkills::GetEntity(size_t index) const
36 {
37     (void)index;
38     std::string entity;
39     return entity;
40 }
41 
AddEntity(const std::string & entity)42 void MatchingSkills::AddEntity(const std::string& entity)
43 {
44     (void)entity;
45 }
46 
HasEntity(const std::string & entity) const47 bool MatchingSkills::HasEntity(const std::string& entity) const
48 {
49     (void)entity;
50     return true;
51 }
52 
RemoveEntity(const std::string & entity)53 void MatchingSkills::RemoveEntity(const std::string& entity)
54 {
55     (void)entity;
56 }
57 
CountEntities() const58 size_t MatchingSkills::CountEntities() const
59 {
60     return entities_.size();
61 }
62 
AddEvent(const std::string & event)63 void MatchingSkills::AddEvent(const std::string& event)
64 {
65     (void)event;
66     GTEST_LOG_(INFO) << "MOCK MatchingSkills AddEvent";
67 }
68 
CountEvent() const69 size_t MatchingSkills::CountEvent() const
70 {
71     return events_.size();
72 }
73 
GetEvent(size_t index) const74 std::string MatchingSkills::GetEvent(size_t index) const
75 {
76     std::string event;
77     (void)index;
78     return event;
79 }
80 
GetEvents() const81 std::vector<std::string> MatchingSkills::GetEvents() const
82 {
83     return events_;
84 }
85 
RemoveEvent(const std::string & event)86 void MatchingSkills::RemoveEvent(const std::string& event)
87 {
88     (void)event;
89 }
90 
HasEvent(const std::string & event) const91 bool MatchingSkills::HasEvent(const std::string& event) const
92 {
93     (void)event;
94     return true;
95 }
96 
GetScheme(size_t index) const97 std::string MatchingSkills::GetScheme(size_t index) const
98 {
99     std::string schemes;
100     (void)index;
101     return schemes;
102 }
103 
AddScheme(const std::string & scheme)104 void MatchingSkills::AddScheme(const std::string& scheme)
105 {
106     (void)scheme;
107 }
108 
HasScheme(const std::string & scheme) const109 bool MatchingSkills::HasScheme(const std::string& scheme) const
110 {
111     (void)scheme;
112     return true;
113 }
114 
RemoveScheme(const std::string & scheme)115 void MatchingSkills::RemoveScheme(const std::string& scheme)
116 {
117     (void)scheme;
118 }
119 
CountSchemes() const120 size_t MatchingSkills::CountSchemes() const
121 {
122     return 0;
123 }
124 
Marshalling(Parcel & parcel) const125 bool MatchingSkills::Marshalling(Parcel& parcel) const
126 {
127     (void)parcel;
128     return true;
129 }
130 
ReadFromParcel(Parcel & parcel)131 bool MatchingSkills::ReadFromParcel(Parcel& parcel)
132 {
133     (void)parcel;
134     return true;
135 }
136 
Unmarshalling(Parcel & parcel)137 MatchingSkills* MatchingSkills::Unmarshalling(Parcel& parcel)
138 {
139     (void)parcel;
140     return nullptr;
141 }
142 
MatchEvent(const std::string & event) const143 bool MatchingSkills::MatchEvent(const std::string& event) const
144 {
145     (void)event;
146     return true;
147 }
148 
MatchEntity(const std::vector<std::string> & entities) const149 bool MatchingSkills::MatchEntity(const std::vector<std::string>& entities) const
150 {
151     (void)entities;
152     return true;
153 }
154 
MatchScheme(const std::string & scheme) const155 bool MatchingSkills::MatchScheme(const std::string& scheme) const
156 {
157     (void)scheme;
158     return true;
159 }
160 
Match(const Want & want) const161 bool MatchingSkills::Match(const Want& want) const
162 {
163     (void)want;
164     return true;
165 }
166 } // namespace EventFwk
167 } // namespace OHOS
168