• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef FOUNDATION_AAFWK_SERVICES_TEST_MOCK_APP_SCHEDULER_H
17 #define FOUNDATION_AAFWK_SERVICES_TEST_MOCK_APP_SCHEDULER_H
18 
19 #include "gmock/gmock.h"
20 #include "refbase.h"
21 #include "iremote_object.h"
22 #include "app_scheduler.h"
23 #include "app_launch_data.h"
24 #include "dummy_configuration.h"
25 
26 namespace OHOS {
27 namespace AAFwk {
28 class MockAppScheduler : public AppScheduler {
29 public:
MockAppScheduler()30     MockAppScheduler(){};
~MockAppScheduler()31     virtual ~MockAppScheduler(){};
32 
33     MOCK_METHOD0(ScheduleForegroundApplication, void());
34     MOCK_METHOD0(ScheduleBackgroundApplication, void());
35     MOCK_METHOD0(ScheduleTerminateApplication, void());
36     MOCK_METHOD1(ScheduleLaunchApplication, void(const AppExecFwk::AppLaunchData &));
37     MOCK_METHOD2(ScheduleLaunchAbility, void(const AppExecFwk::AbilityInfo &, const sptr<IRemoteObject> &));
38     MOCK_METHOD1(ScheduleCleanAbility, void(const sptr<IRemoteObject> &));
39     MOCK_METHOD1(ScheduleProfileChanged, void(const AppExecFwk::Profile &));
40     MOCK_METHOD1(ScheduleConfigurationUpdated, void(const AppExecFwk::Configuration &config));
41     MOCK_METHOD1(ScheduleShrinkMemory, void(const int));
42     MOCK_METHOD0(ScheduleLowMemory, void());
43 };
44 }  // namespace AAFwk
45 }  // namespace OHOS
46 #endif  // FOUNDATION_AAFWK_SERVICES_TEST_MOCK_APP_SCHEDULER_H
47