mirror of
				https://gitee.com/jiuyilian/embedded-framework.git
				synced 2025-10-24 18:20:15 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			69 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.4 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);
 | |
|     void MockGetParamValue(void);
 | |
|     void MockGetCapability(void);
 | |
|     void MockGetLockVideoStatus(void);
 | |
|     void MockGetStorageInfo(void);
 | |
|     void MockGetStorageFileList(void);
 | |
|     void MockSetParamValue(void);
 | |
|     void MockEnterRecorder(void);
 | |
|     void MockAppPlayback(void);
 | |
|     void MockMonitorSetFileList(std::vector<AppGetFileList> &files);
 | |
| 
 | |
| protected:
 | |
|     void MockAppClientConnect(void);
 | |
|     void MockSetRecordingStatus(const RecordingStatus &status);
 | |
|     void MockSetMicrophoneStatus(const MicrophoneStatus &status);
 | |
|     void MockSetBatteryStatus(const BatteryStatus &status, const int &batteryCapacity);
 | |
|     void MockSetSdCardStatus(const SdCardStatus &status);
 | |
|     void MockDeletedFileMessage(const std::string &file, const StorageFileType &type);
 | |
|     void MockCreatedFileMessage(const std::string &file, const StorageFileType &type);
 | |
| 
 | |
| private:
 | |
|     void AppManagerMockInit(std::shared_ptr<IAppManager> &vMock);
 | |
|     void AppMonitorInit(std::shared_ptr<VAppMonitor> &vMock);
 | |
| 
 | |
| private:
 | |
|     std::shared_ptr<IAppManager> mAppManagerMock;
 | |
|     std::shared_ptr<VAppMonitor> mAppMonitorMock;
 | |
|     void *mAppClientTool;
 | |
|     std::shared_ptr<VAppClient> mAppClient;
 | |
| 
 | |
| public:
 | |
|     static std::shared_ptr<VAppMonitor> MakeMonitorMock(void);
 | |
| };
 | |
| #endif | 
