hunting/test/middleware/AppManager/tool/include/AppManagerTestTool.h
2024-03-04 04:49:07 -08:00

49 lines
1.5 KiB
C++

/*
* Copyright (c) 2023 Fancy Code.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef APP_MANAGER_TEST_TOOL_H
#define APP_MANAGER_TEST_TOOL_H
#include "GtestUsing.h"
#include "IAppManager.h"
#include <memory>
class AppManagerTestTool
{
public:
AppManagerTestTool() = default;
virtual ~AppManagerTestTool() = default;
void Init(void);
void UnInit(void);
protected:
void MockGetProductInfo(void);
void MockGetDeviceAttr(void);
void MockGetMediaInfo(void);
void MockGetSdCardInfo(void);
void MockGetBatteryInfo(void);
void MockSetDateTime(void);
void MockSetTimeZone(void);
void MockUploadFiles(void);
private:
void AppManagerMockInit(std::shared_ptr<IAppManager> &vMock);
private:
std::shared_ptr<IAppManager> mAppManagerMock;
std::shared_ptr<VAppMonitor> mAppMonitorMock;
public:
static std::shared_ptr<VAppMonitor> MakeMonitorMock(void);
void AppMonitorInit(std::shared_ptr<VAppMonitor> &vMock);
};
#endif