| | |
| | | |
| | | #ifndef VSSLOCALSETTINGTBL_MANAGER_TEST_H |
| | | #define VSSLOCALSETTINGTBL_MANAGER_TEST_H |
| | | |
| | | #include "../model/VssLocalSettingTbl.h" |
| | | #include "../model/VssLocalSettingTblBuilder.h" |
| | | #include "../dao/VssLocalSettingTblDao.h" |
| | | #include <basic/debug/Debug.h> |
| | | |
| | | /** |
| | | * 测试本地国标配置管理类 |
| | | */ |
| | | class VssLocalSettingTblDaoTest { |
| | | private: |
| | | /** 本地国标配置DaoTest构造函数 */ |
| | | VssLocalSettingTblDaoTest() {} |
| | | public: |
| | | /** 本地国标配置DaoTest单例模式 */ |
| | | static VssLocalSettingTblDaoTest* instance() { |
| | | static VssLocalSettingTblDaoTest instance; |
| | | return &instance; |
| | | } |
| | | |
| | | /** 测试添加本地国标配置 */ |
| | | void testAddVssLocalSettingTbl() { |
| | | VssLocalSettingTblBuilder vssLocalSettingTblBuilder; |
| | | vssLocalSettingTblBuilder.addID(0); |
| | | vssLocalSettingTblBuilder.addServerIp(""); |
| | | vssLocalSettingTblBuilder.addServerPort(""); |
| | | vssLocalSettingTblBuilder.addServerId(""); |
| | | vssLocalSettingTblBuilder.addUserAuthId(""); |
| | | vssLocalSettingTblBuilder.addPassword(""); |
| | | vssLocalSettingTblBuilder.addUpdateTime(""); |
| | | VssLocalSettingTblDao::instance()->addVssLocalSettingTbl(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap()); |
| | | } |
| | | |
| | | /** 测试更新本地国标配置 */ |
| | | void testUpdateVssLocalSettingTbl() { |
| | | VssLocalSettingTblBuilder vssLocalSettingTblBuilder; |
| | | vssLocalSettingTblBuilder.addID(0); |
| | | vssLocalSettingTblBuilder.addServerIp(""); |
| | | vssLocalSettingTblBuilder.addServerPort(""); |
| | | vssLocalSettingTblBuilder.addServerId(""); |
| | | vssLocalSettingTblBuilder.addUserAuthId(""); |
| | | vssLocalSettingTblBuilder.addPassword(""); |
| | | vssLocalSettingTblBuilder.addUpdateTime(""); |
| | | |
| | | VssLocalSettingTblDao::instance()->updateVssLocalSettingTbl(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap(), |
| | | vssLocalSettingTblBuilder.buildVssLocalSettingTblMap()); |
| | | } |
| | | |
| | | /** 测试查询本地国标配置列表*/ |
| | | void testFindVssLocalSettingTblList() { |
| | | vector<VssLocalSettingTbl> vssLocalSettingTblVec = VssLocalSettingTblDao::instance()->findAllVssLocalSettingTblList(); |
| | | } |
| | | |
| | | private: |
| | | |
| | | }; |
| | | |
| | | #endif //VSSLOCALSETTINGTBL_MANAGER_TEST_H |
| | | |
| | |
|
| | | #ifndef VSSLOCALSETTINGTBL_MANAGER_TEST_H
|
| | | #define VSSLOCALSETTINGTBL_MANAGER_TEST_H
|
| | |
|
| | | #include "../model/VssLocalSettingTbl.h"
|
| | | #include "../model/VssLocalSettingTblBuilder.h"
|
| | | #include "../dao/VssLocalSettingTblDao.h"
|
| | | #include <basic/debug/Debug.h>
|
| | |
|
| | | /**
|
| | | * 测试本地国标配置管理类
|
| | | */
|
| | | class VssLocalSettingTblDaoTest {
|
| | | private:
|
| | | /** 本地国标配置DaoTest构造函数 */
|
| | | VssLocalSettingTblDaoTest() {}
|
| | | public:
|
| | | /** 本地国标配置DaoTest单例模式 */
|
| | | static VssLocalSettingTblDaoTest* instance() {
|
| | | static VssLocalSettingTblDaoTest instance;
|
| | | return &instance;
|
| | | }
|
| | |
|
| | | /** 测试添加本地国标配置 */
|
| | | void testAddVssLocalSettingTbl() {
|
| | | VssLocalSettingTblBuilder vssLocalSettingTblBuilder;
|
| | | vssLocalSettingTblBuilder.addID(0);
|
| | | vssLocalSettingTblBuilder.addServerIp("");
|
| | | vssLocalSettingTblBuilder.addServerPort("");
|
| | | vssLocalSettingTblBuilder.addServerId("");
|
| | | vssLocalSettingTblBuilder.addUserAuthId("");
|
| | | vssLocalSettingTblBuilder.addPassword("");
|
| | | vssLocalSettingTblBuilder.addUpdateTime("");
|
| | | VssLocalSettingTblDao::instance()->addVssLocalSettingTbl(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap());
|
| | | }
|
| | | |
| | | /** 测试更新本地国标配置 */
|
| | | void testUpdateVssLocalSettingTbl() {
|
| | | VssLocalSettingTblBuilder vssLocalSettingTblBuilder;
|
| | | vssLocalSettingTblBuilder.addID(0);
|
| | | vssLocalSettingTblBuilder.addServerIp("");
|
| | | vssLocalSettingTblBuilder.addServerPort("");
|
| | | vssLocalSettingTblBuilder.addServerId("");
|
| | | vssLocalSettingTblBuilder.addUserAuthId("");
|
| | | vssLocalSettingTblBuilder.addPassword("");
|
| | | vssLocalSettingTblBuilder.addUpdateTime("");
|
| | | |
| | | VssLocalSettingTblDao::instance()->updateVssLocalSettingTbl(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap(),
|
| | | vssLocalSettingTblBuilder.buildVssLocalSettingTblMap());
|
| | | }
|
| | | |
| | | /** 测试查询本地国标配置列表*/
|
| | | void testFindVssLocalSettingTblList() {
|
| | | vector<VssLocalSettingTbl> vssLocalSettingTblVec = VssLocalSettingTblDao::instance()->findAllVssLocalSettingTblList();
|
| | | }
|
| | | |
| | | private:
|
| | | |
| | | };
|
| | |
|
| | | #endif //VSSLOCALSETTINGTBL_MANAGER_TEST_H
|
| | |
|