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()22MatchingSkills::MatchingSkills() 23 {} 24 MatchingSkills(const MatchingSkills & matchingSkills)25MatchingSkills::MatchingSkills(const MatchingSkills& matchingSkills) 26 { 27 entities_ = matchingSkills.entities_; 28 events_ = matchingSkills.events_; 29 schemes_ = matchingSkills.schemes_; 30 } 31 ~MatchingSkills()32MatchingSkills::~MatchingSkills() 33 {} 34 GetEntity(size_t index) const35std::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)42void MatchingSkills::AddEntity(const std::string& entity) 43 { 44 (void)entity; 45 } 46 HasEntity(const std::string & entity) const47bool MatchingSkills::HasEntity(const std::string& entity) const 48 { 49 (void)entity; 50 return true; 51 } 52 RemoveEntity(const std::string & entity)53void MatchingSkills::RemoveEntity(const std::string& entity) 54 { 55 (void)entity; 56 } 57 CountEntities() const58size_t MatchingSkills::CountEntities() const 59 { 60 return entities_.size(); 61 } 62 AddEvent(const std::string & event)63void MatchingSkills::AddEvent(const std::string& event) 64 { 65 (void)event; 66 GTEST_LOG_(INFO) << "MOCK MatchingSkills AddEvent"; 67 } 68 CountEvent() const69size_t MatchingSkills::CountEvent() const 70 { 71 return events_.size(); 72 } 73 GetEvent(size_t index) const74std::string MatchingSkills::GetEvent(size_t index) const 75 { 76 std::string event; 77 (void)index; 78 return event; 79 } 80 GetEvents() const81std::vector<std::string> MatchingSkills::GetEvents() const 82 { 83 return events_; 84 } 85 RemoveEvent(const std::string & event)86void MatchingSkills::RemoveEvent(const std::string& event) 87 { 88 (void)event; 89 } 90 HasEvent(const std::string & event) const91bool MatchingSkills::HasEvent(const std::string& event) const 92 { 93 (void)event; 94 return true; 95 } 96 GetScheme(size_t index) const97std::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)104void MatchingSkills::AddScheme(const std::string& scheme) 105 { 106 (void)scheme; 107 } 108 HasScheme(const std::string & scheme) const109bool MatchingSkills::HasScheme(const std::string& scheme) const 110 { 111 (void)scheme; 112 return true; 113 } 114 RemoveScheme(const std::string & scheme)115void MatchingSkills::RemoveScheme(const std::string& scheme) 116 { 117 (void)scheme; 118 } 119 CountSchemes() const120size_t MatchingSkills::CountSchemes() const 121 { 122 return 0; 123 } 124 Marshalling(Parcel & parcel) const125bool MatchingSkills::Marshalling(Parcel& parcel) const 126 { 127 (void)parcel; 128 return true; 129 } 130 ReadFromParcel(Parcel & parcel)131bool MatchingSkills::ReadFromParcel(Parcel& parcel) 132 { 133 (void)parcel; 134 return true; 135 } 136 Unmarshalling(Parcel & parcel)137MatchingSkills* MatchingSkills::Unmarshalling(Parcel& parcel) 138 { 139 (void)parcel; 140 return nullptr; 141 } 142 MatchEvent(const std::string & event) const143bool MatchingSkills::MatchEvent(const std::string& event) const 144 { 145 (void)event; 146 return true; 147 } 148 MatchEntity(const std::vector<std::string> & entities) const149bool MatchingSkills::MatchEntity(const std::vector<std::string>& entities) const 150 { 151 (void)entities; 152 return true; 153 } 154 MatchScheme(const std::string & scheme) const155bool MatchingSkills::MatchScheme(const std::string& scheme) const 156 { 157 (void)scheme; 158 return true; 159 } 160 Match(const Want & want) const161bool MatchingSkills::Match(const Want& want) const 162 { 163 (void)want; 164 return true; 165 } 166 } // namespace EventFwk 167 } // namespace OHOS 168