1885b47fbSopenharmony_ci/* 2885b47fbSopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3885b47fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4885b47fbSopenharmony_ci * you may not use this file except in compliance with the License. 5885b47fbSopenharmony_ci * You may obtain a copy of the License at 6885b47fbSopenharmony_ci * 7885b47fbSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8885b47fbSopenharmony_ci * 9885b47fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10885b47fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11885b47fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12885b47fbSopenharmony_ci * See the License for the specific language governing permissions and 13885b47fbSopenharmony_ci * limitations under the License. 14885b47fbSopenharmony_ci */ 15885b47fbSopenharmony_ci 16885b47fbSopenharmony_ci#include <gtest/gtest.h> 17885b47fbSopenharmony_ci#include "matching_skills.h" 18885b47fbSopenharmony_ci#include "string_ex.h" 19885b47fbSopenharmony_ci 20885b47fbSopenharmony_cinamespace OHOS { 21885b47fbSopenharmony_cinamespace EventFwk { 22885b47fbSopenharmony_ciMatchingSkills::MatchingSkills() 23885b47fbSopenharmony_ci{} 24885b47fbSopenharmony_ci 25885b47fbSopenharmony_ciMatchingSkills::MatchingSkills(const MatchingSkills& matchingSkills) 26885b47fbSopenharmony_ci{ 27885b47fbSopenharmony_ci GTEST_LOG_(INFO) << "MOCK MatchingSkills MatchingSkills"; 28885b47fbSopenharmony_ci entities_ = matchingSkills.entities_; 29885b47fbSopenharmony_ci events_ = matchingSkills.events_; 30885b47fbSopenharmony_ci schemes_ = matchingSkills.schemes_; 31885b47fbSopenharmony_ci} 32885b47fbSopenharmony_ci 33885b47fbSopenharmony_ciMatchingSkills::~MatchingSkills() 34885b47fbSopenharmony_ci{} 35885b47fbSopenharmony_ci 36885b47fbSopenharmony_cistd::string MatchingSkills::GetEntity(size_t index) const 37885b47fbSopenharmony_ci{ 38885b47fbSopenharmony_ci (void)index; 39885b47fbSopenharmony_ci std::string entity(""); 40885b47fbSopenharmony_ci return entity; 41885b47fbSopenharmony_ci} 42885b47fbSopenharmony_ci 43885b47fbSopenharmony_civoid MatchingSkills::AddEntity(const std::string& entity) 44885b47fbSopenharmony_ci{ 45885b47fbSopenharmony_ci (void)entity; 46885b47fbSopenharmony_ci} 47885b47fbSopenharmony_ci 48885b47fbSopenharmony_cibool MatchingSkills::HasEntity(const std::string& entity) const 49885b47fbSopenharmony_ci{ 50885b47fbSopenharmony_ci (void)entity; 51885b47fbSopenharmony_ci return true; 52885b47fbSopenharmony_ci} 53885b47fbSopenharmony_ci 54885b47fbSopenharmony_civoid MatchingSkills::RemoveEntity(const std::string& entity) 55885b47fbSopenharmony_ci{ 56885b47fbSopenharmony_ci (void)entity; 57885b47fbSopenharmony_ci} 58885b47fbSopenharmony_ci 59885b47fbSopenharmony_cisize_t MatchingSkills::CountEntities() const 60885b47fbSopenharmony_ci{ 61885b47fbSopenharmony_ci return entities_.size(); 62885b47fbSopenharmony_ci} 63885b47fbSopenharmony_ci 64885b47fbSopenharmony_civoid MatchingSkills::AddEvent(const std::string& event) 65885b47fbSopenharmony_ci{ 66885b47fbSopenharmony_ci GTEST_LOG_(INFO) << "MOCK MatchingSkills AddEvent"; 67885b47fbSopenharmony_ci} 68885b47fbSopenharmony_ci 69885b47fbSopenharmony_cisize_t MatchingSkills::CountEvent() const 70885b47fbSopenharmony_ci{ 71885b47fbSopenharmony_ci return events_.size(); 72885b47fbSopenharmony_ci} 73885b47fbSopenharmony_ci 74885b47fbSopenharmony_cistd::string MatchingSkills::GetEvent(size_t index) const 75885b47fbSopenharmony_ci{ 76885b47fbSopenharmony_ci std::string event; 77885b47fbSopenharmony_ci return event; 78885b47fbSopenharmony_ci} 79885b47fbSopenharmony_ci 80885b47fbSopenharmony_cistd::vector<std::string> MatchingSkills::GetEvents() const 81885b47fbSopenharmony_ci{ 82885b47fbSopenharmony_ci return events_; 83885b47fbSopenharmony_ci} 84885b47fbSopenharmony_ci 85885b47fbSopenharmony_civoid MatchingSkills::RemoveEvent(const std::string& event) 86885b47fbSopenharmony_ci{ 87885b47fbSopenharmony_ci (void)event; 88885b47fbSopenharmony_ci} 89885b47fbSopenharmony_ci 90885b47fbSopenharmony_cibool MatchingSkills::HasEvent(const std::string& event) const 91885b47fbSopenharmony_ci{ 92885b47fbSopenharmony_ci (void)event; 93885b47fbSopenharmony_ci return true; 94885b47fbSopenharmony_ci} 95885b47fbSopenharmony_ci 96885b47fbSopenharmony_cistd::string MatchingSkills::GetScheme(size_t index) const 97885b47fbSopenharmony_ci{ 98885b47fbSopenharmony_ci (void)index; 99885b47fbSopenharmony_ci std::string schemes(""); 100885b47fbSopenharmony_ci return schemes; 101885b47fbSopenharmony_ci} 102885b47fbSopenharmony_ci 103885b47fbSopenharmony_civoid MatchingSkills::AddScheme(const std::string& scheme) 104885b47fbSopenharmony_ci{} 105885b47fbSopenharmony_ci 106885b47fbSopenharmony_cibool MatchingSkills::HasScheme(const std::string& scheme) const 107885b47fbSopenharmony_ci{ 108885b47fbSopenharmony_ci return true; 109885b47fbSopenharmony_ci} 110885b47fbSopenharmony_ci 111885b47fbSopenharmony_civoid MatchingSkills::RemoveScheme(const std::string& scheme) 112885b47fbSopenharmony_ci{} 113885b47fbSopenharmony_ci 114885b47fbSopenharmony_cisize_t MatchingSkills::CountSchemes() const 115885b47fbSopenharmony_ci{ 116885b47fbSopenharmony_ci return 0; 117885b47fbSopenharmony_ci} 118885b47fbSopenharmony_ci 119885b47fbSopenharmony_cibool MatchingSkills::Marshalling(Parcel& parcel) const 120885b47fbSopenharmony_ci{ 121885b47fbSopenharmony_ci return true; 122885b47fbSopenharmony_ci} 123885b47fbSopenharmony_ci 124885b47fbSopenharmony_cibool MatchingSkills::ReadFromParcel(Parcel& parcel) 125885b47fbSopenharmony_ci{ 126885b47fbSopenharmony_ci return true; 127885b47fbSopenharmony_ci} 128885b47fbSopenharmony_ci 129885b47fbSopenharmony_ciMatchingSkills* MatchingSkills::Unmarshalling(Parcel& parcel) 130885b47fbSopenharmony_ci{ 131885b47fbSopenharmony_ci return nullptr; 132885b47fbSopenharmony_ci} 133885b47fbSopenharmony_ci 134885b47fbSopenharmony_cibool MatchingSkills::MatchEvent(const std::string& event) const 135885b47fbSopenharmony_ci{ 136885b47fbSopenharmony_ci return true; 137885b47fbSopenharmony_ci} 138885b47fbSopenharmony_ci 139885b47fbSopenharmony_cibool MatchingSkills::MatchEntity(const std::vector<std::string>& entities) const 140885b47fbSopenharmony_ci{ 141885b47fbSopenharmony_ci return true; 142885b47fbSopenharmony_ci} 143885b47fbSopenharmony_ci 144885b47fbSopenharmony_cibool MatchingSkills::MatchScheme(const std::string& scheme) const 145885b47fbSopenharmony_ci{ 146885b47fbSopenharmony_ci return true; 147885b47fbSopenharmony_ci} 148885b47fbSopenharmony_ci 149885b47fbSopenharmony_cibool MatchingSkills::Match(const Want& want) const 150885b47fbSopenharmony_ci{ 151885b47fbSopenharmony_ci return true; 152885b47fbSopenharmony_ci} 153885b47fbSopenharmony_ci} // namespace EventFwk 154885b47fbSopenharmony_ci} // namespace OHOS 155