1 /* 2 * Copyright (c) 2021 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 "mock_lifecycle_observer.h" 17 #include <gtest/gtest.h> 18 19 namespace OHOS { 20 namespace AppExecFwk { OnActive()21void MockLifecycleObserver::OnActive() 22 { 23 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnActive called"; 24 } 25 OnBackground()26void MockLifecycleObserver::OnBackground() 27 { 28 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnBackground called"; 29 } 30 OnForeground(const Want & want)31void MockLifecycleObserver::OnForeground(const Want& want) 32 { 33 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnForeground called"; 34 } 35 OnInactive()36void MockLifecycleObserver::OnInactive() 37 { 38 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnInactive called"; 39 } 40 OnStart(const Want & want)41void MockLifecycleObserver::OnStart(const Want& want) 42 { 43 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnStart called"; 44 } 45 OnStop()46void MockLifecycleObserver::OnStop() 47 { 48 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnStop called"; 49 } 50 OnStateChanged(LifeCycle::Event event,const Want & want)51void MockLifecycleObserver::OnStateChanged(LifeCycle::Event event, const Want& want) 52 { 53 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnStateChanged called"; 54 } 55 OnStateChanged(LifeCycle::Event event)56void MockLifecycleObserver::OnStateChanged(LifeCycle::Event event) 57 { 58 GTEST_LOG_(INFO) << "MockLifecycleObserver::OnStateChanged called"; 59 } 60 } // namespace AppExecFwk 61 } // namespace OHOS 62