• 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     std::string entity;
38     return entity;
39 }
40 
AddEntity(const std::string & entity)41 void MatchingSkills::AddEntity(const std::string& entity)
42 {}
43 
HasEntity(const std::string & entity) const44 bool MatchingSkills::HasEntity(const std::string& entity) const
45 {
46     return true;
47 }
48 
RemoveEntity(const std::string & entity)49 void MatchingSkills::RemoveEntity(const std::string& entity)
50 {}
51 
CountEntities() const52 size_t MatchingSkills::CountEntities() const
53 {
54     return entities_.size();
55 }
56 
AddEvent(const std::string & event)57 void MatchingSkills::AddEvent(const std::string& event)
58 {
59     GTEST_LOG_(INFO) << "MOCK MatchingSkills AddEvent";
60 }
61 
CountEvent() const62 size_t MatchingSkills::CountEvent() const
63 {
64     return events_.size();
65 }
66 
GetEvent(size_t index) const67 std::string MatchingSkills::GetEvent(size_t index) const
68 {
69     std::string event;
70     return event;
71 }
72 
GetEvents() const73 std::vector<std::string> MatchingSkills::GetEvents() const
74 {
75     return events_;
76 }
77 
RemoveEvent(const std::string & event)78 void MatchingSkills::RemoveEvent(const std::string& event)
79 {}
80 
HasEvent(const std::string & event) const81 bool MatchingSkills::HasEvent(const std::string& event) const
82 {
83     return true;
84 }
85 
GetScheme(size_t index) const86 std::string MatchingSkills::GetScheme(size_t index) const
87 {
88     std::string schemes;
89     return schemes;
90 }
91 
AddScheme(const std::string & scheme)92 void MatchingSkills::AddScheme(const std::string& scheme)
93 {}
94 
HasScheme(const std::string & scheme) const95 bool MatchingSkills::HasScheme(const std::string& scheme) const
96 {
97     return true;
98 }
99 
RemoveScheme(const std::string & scheme)100 void MatchingSkills::RemoveScheme(const std::string& scheme)
101 {}
102 
CountSchemes() const103 size_t MatchingSkills::CountSchemes() const
104 {
105     return 0;
106 }
107 
Marshalling(Parcel & parcel) const108 bool MatchingSkills::Marshalling(Parcel& parcel) const
109 {
110     return true;
111 }
112 
ReadFromParcel(Parcel & parcel)113 bool MatchingSkills::ReadFromParcel(Parcel& parcel)
114 {
115     return true;
116 }
117 
Unmarshalling(Parcel & parcel)118 MatchingSkills* MatchingSkills::Unmarshalling(Parcel& parcel)
119 {
120     return nullptr;
121 }
122 
MatchEvent(const std::string & event) const123 bool MatchingSkills::MatchEvent(const std::string& event) const
124 {
125     return true;
126 }
127 
MatchEntity(const std::vector<std::string> & entities) const128 bool MatchingSkills::MatchEntity(const std::vector<std::string>& entities) const
129 {
130     return true;
131 }
132 
MatchScheme(const std::string & scheme) const133 bool MatchingSkills::MatchScheme(const std::string& scheme) const
134 {
135     return true;
136 }
137 
Match(const Want & want) const138 bool MatchingSkills::Match(const Want& want) const
139 {
140     return true;
141 }
142 } // namespace EventFwk
143 } // namespace OHOS
144