public static void UserAllTest() { Global.LstInfo.Add("--- 用户管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; //启动成功,登录 var _login = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 用户列表 //点击用户管理菜单,加载所有用户 res_Launch = UserTest.Load_UserList(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入用户名称,点击查询按钮,加载该用户 res_Launch = UserTest.Search_UserName(Global.Win_Denture, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //用户名称为空,点击查询按钮,加载所有用户 res_Launch = UserTest.Search_UserNameNull(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } #endregion #region 新增用户 //新增用户,账号名称为空 res_Launch = UserTest.AddUser_UserNameBull(Global.Win_Denture, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //新增用户,账号名称最少5个字|多于30个字 res_Launch = UserTest.AddUser_UserNameLength(Global.Win_Denture, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } //新增用户,密码为空 res_Launch = UserTest.AddUser_PwdBull(Global.Win_Denture, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //新增用户,密码少于8位|多于30位 res_Launch = UserTest.AddUser_PwdLength(Global.Win_Denture, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } //新增用户,邮箱地址格式不正确 res_Launch = UserTest.AddUser_EmailError(Global.Win_Denture, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增用户,角色为空 res_Launch = UserTest.AddUser_RoleNull(Global.Win_Denture, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //新增用户,真实姓名为空|真实姓名多于30个字 res_Launch = UserTest.AddUser_RealNameLength(Global.Win_Denture, out string msg11); Global.LstInfo.Add(msg11); if (!res_Launch) { return; } //新增用户,真实姓名为空|真实姓名多于30个字 res_Launch = UserTest.AddUser_IDCard(Global.Win_Denture, out string msg25); Global.LstInfo.Add(msg25); if (!res_Launch) { return; } //新增用户,真实姓名为空|真实姓名多于30个字 res_Launch = UserTest.AddUser_Phone(Global.Win_Denture, out string msg26); Global.LstInfo.Add(msg26); if (!res_Launch) { return; } //新增用户成功,同时关闭新增用户窗口 res_Launch = UserTest.AddUserSucc(Global.Win_Denture, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //新增用户,点击取消按钮,关闭新增用户窗口 res_Launch = UserTest.AddUser_ClickCancle(Global.Win_Denture, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } #endregion #region 编辑角色 //编辑用户,账号名称为空 res_Launch = UserTest.EditUser_UserNameBull(Global.Win_Denture, out string msg13); Global.LstInfo.Add(msg13); if (!res_Launch) { return; } //编辑用户,账号名称最少5个字符|多于30个字符 res_Launch = UserTest.EditUser_UserNameLength(Global.Win_Denture, out string msg14); Global.LstInfo.Add(msg14); if (!res_Launch) { return; } //编辑用户,不修改密码 res_Launch = UserTest.EditUser_NoEditPwd(Global.Win_Denture, out string msg15); Global.LstInfo.Add(msg15); if (!res_Launch) { return; } //编辑用户,修改密码为少于8位|多于30位 res_Launch = UserTest.EditUser_PwdLength(Global.Win_Denture, out string msg16); Global.LstInfo.Add(msg16); if (!res_Launch) { return; } //编辑用户,邮箱地址格式不正确 res_Launch = UserTest.EditUser_EmailError(Global.Win_Denture, out string msg17); Global.LstInfo.Add(msg17); if (!res_Launch) { return; } //编辑用户,修改角色为空 res_Launch = UserTest.EditUser_EditRole(Global.Win_Denture, out string msg18); Global.LstInfo.Add(msg18); if (!res_Launch) { return; } //编辑用户,真实姓名为空|真实姓名多于30个字符 res_Launch = UserTest.EditUser_RealNameLength(Global.Win_Denture, out string msg19); Global.LstInfo.Add(msg19); if (!res_Launch) { return; } //编辑用户,真实姓名为空|真实姓名多于30个字符 res_Launch = UserTest.EditUser_IDCard(Global.Win_Denture, out string msg27); Global.LstInfo.Add(msg27); if (!res_Launch) { return; } //编辑用户,真实姓名为空|真实姓名多于30个字符 res_Launch = UserTest.EditUser_Phone(Global.Win_Denture, out string msg28); Global.LstInfo.Add(msg28); if (!res_Launch) { return; } //编辑用户成功,同时关闭编辑用户窗口 res_Launch = UserTest.EditUserSucc(Global.Win_Denture, out string msg20); Global.LstInfo.Add(msg20); if (!res_Launch) { return; } //编辑用户,无修改操作,点击确定按钮 res_Launch = UserTest.EditUser_NoEdit(Global.Win_Denture, out string msg22); Global.LstInfo.Add(msg22); if (!res_Launch) { return; } //编辑用户,点击取消按钮,关闭编辑用户窗口 res_Launch = UserTest.EditUser_ClickCancle(Global.Win_Denture, out string msg21); Global.LstInfo.Add(msg21); if (!res_Launch) { return; } #endregion #region 除用户 //点击删除用户按钮,弹出提醒框,选择确定 res_Launch = UserTest.Del_UserComfirm(Global.Win_Denture, out string msg23); Global.LstInfo.Add(msg23); if (!res_Launch) { return; } //点击删除用户按钮,弹出提醒框,选择取消 res_Launch = UserTest.Del_UserCancle(Global.Win_Denture, out string msg24); Global.LstInfo.Add(msg24); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Denture.Close(); }
public static void FactoryAllTest() { Global.LstInfo.Add("--- 技工厂管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; //启动成功,登录 var _login = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 技工厂列表 //点击技工厂管理菜单,加载所有技工厂 res_Launch = FactoryTest.Load_FactoryList(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入技工厂名称,点击查询按钮,加载该技工厂 res_Launch = FactoryTest.Search_FactoryName(Global.Win_Denture, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //技工厂名称为空,点击查询按钮,加载所有技工厂 res_Launch = FactoryTest.Search_FactoryNameNull(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } #endregion #region 新增技工厂 //新增技工厂,工厂名称为空 res_Launch = FactoryTest.AddFactory_FactoryNameBull(Global.Win_Denture, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //新增技工厂,工厂名称多于50个字 res_Launch = FactoryTest.AddFactory_FactoryNameLength(Global.Win_Denture, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } //新增技工厂,地址为空 res_Launch = FactoryTest.AddFactory_AddressNull(Global.Win_Denture, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增技工厂,地址多于150个字 res_Launch = FactoryTest.AddFactory_AddressLength(Global.Win_Denture, out string msg25); Global.LstInfo.Add(msg25); if (!res_Launch) { return; } //新增技工厂,电话为空 res_Launch = FactoryTest.AddFactory_PhoneNull(Global.Win_Denture, out string msg26); Global.LstInfo.Add(msg26); if (!res_Launch) { return; } //新增技工厂,负责人为空 res_Launch = FactoryTest.AddFactory_ManagerNull(Global.Win_Denture, out string msg27); Global.LstInfo.Add(msg27); if (!res_Launch) { return; } //新增技工厂成功,同时关闭新增技工厂窗口 res_Launch = FactoryTest.AddFactorySucc(Global.Win_Denture, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //新增技工厂,点击取消按钮,关闭新增技工厂窗口 res_Launch = FactoryTest.AddFactory_ClickCancle(Global.Win_Denture, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } #endregion #region 编辑角色 //编辑技工厂,无修改操作,点击确定按钮 res_Launch = FactoryTest.EditFactory_NoEdit(Global.Win_Denture, out string msg22); Global.LstInfo.Add(msg22); if (!res_Launch) { return; } //编辑技工厂,点击取消按钮,关闭编辑技工厂窗口 res_Launch = FactoryTest.EditFactory_ClickCancle(Global.Win_Denture, out string msg21); Global.LstInfo.Add(msg21); if (!res_Launch) { return; } //编辑技工厂,工厂名称为空 res_Launch = FactoryTest.EditFactory_FactoryNameBull(Global.Win_Denture, out string msg28); Global.LstInfo.Add(msg28); if (!res_Launch) { return; } //编辑技工厂,工厂名称多于50个字 res_Launch = FactoryTest.EditFactory_FactoryNameLength(Global.Win_Denture, out string msg29); Global.LstInfo.Add(msg29); if (!res_Launch) { return; } //编辑技工厂,地址为空 res_Launch = FactoryTest.EditFactory_AddressNull(Global.Win_Denture, out string msg30); Global.LstInfo.Add(msg30); if (!res_Launch) { return; } //编辑技工厂,地址多于150个字 res_Launch = FactoryTest.EditFactory_EditressLength(Global.Win_Denture, out string msg31); Global.LstInfo.Add(msg31); if (!res_Launch) { return; } //编辑技工厂,电话为空 res_Launch = FactoryTest.EditFactory_PhoneNull(Global.Win_Denture, out string msg32); Global.LstInfo.Add(msg32); if (!res_Launch) { return; } //编辑技工厂,负责人为空 res_Launch = FactoryTest.EditFactory_ManagerNull(Global.Win_Denture, out string msg33); Global.LstInfo.Add(msg33); if (!res_Launch) { return; } //编辑技工厂成功 res_Launch = FactoryTest.EditFactory_Succ(Global.Win_Denture, out string msg34); Global.LstInfo.Add(msg34); if (!res_Launch) { return; } #endregion #region 除技工厂 ////点击删除技工厂按钮,弹出提醒框,选择确定 //res_Launch = FactoryTest.Del_FactoryComfirm(Global.Win_Denture, out string msg23); //Global.LstInfo.Add(msg23); //if (!res_Launch) return; ////点击删除技工厂按钮,弹出提醒框,选择取消 //res_Launch = FactoryTest.Del_FactoryCancle(Global.Win_Denture, out string msg24); //Global.LstInfo.Add(msg24); //if (!res_Launch) return; #endregion //关闭客户端 Global.Win_Denture.Close(); }
public static void RoleAllTest() { Global.LstInfo.Add("--- 角色管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; //启动成功,登录 var _login = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 角色列表 //点击角色管理菜单,加载所有角色 res_Launch = RoleTest.Load_RoleList(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入角色名称,点击查询按钮,加载该角色 res_Launch = RoleTest.Search_RoleName(Global.Win_Denture, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //角色名称为空,点击查询按钮,加载所有角色 res_Launch = RoleTest.Search_RoleNameNull(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } #endregion #region 新增角色 //新增角色,角色名称为空 res_Launch = RoleTest.AddRole_RoleNameBull(Global.Win_Denture, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //新增角色,角色英文别名为空 res_Launch = RoleTest.AddRole_EnRoleNameBull(Global.Win_Denture, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //新增角色成功,同时关闭新增角色窗口 res_Launch = RoleTest.AddRoleSucc(Global.Win_Denture, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增角色,点击取消按钮,关闭新增角色窗口 res_Launch = RoleTest.AddRole_ClickCancle(Global.Win_Denture, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } #endregion #region 编辑角色 //编辑角色,角色名称为空 res_Launch = RoleTest.EditRole_RoleNameBull(Global.Win_Denture, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //编辑角色,角色英文别名为空 res_Launch = RoleTest.EditRole_EnRoleNameBull(Global.Win_Denture, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } //编辑角色,无修改操作,点击确定按钮 res_Launch = RoleTest.EditRole_NoEdit(Global.Win_Denture, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } //编辑角色,修改角色名称和角色英文别名 res_Launch = RoleTest.EditRole(Global.Win_Denture, out string msg11); Global.LstInfo.Add(msg11); if (!res_Launch) { return; } //编辑角色,点击取消按钮,关闭编辑角色窗口 res_Launch = RoleTest.EditRole_ClickCancle(Global.Win_Denture, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Denture.Close(); }
public static void HospitalAllTest() { Global.LstInfo.Add("--- 医院管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; //启动成功,登录 var _login = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 医院列表 //点击医院管理菜单,加载所有医院 res_Launch = HospitalTest.Load_HospitalList(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入医院名称,点击查询按钮,加载该医院 res_Launch = HospitalTest.Search_HospitalName(Global.Win_Denture, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //医院名称为空,点击查询按钮,加载所有医院 res_Launch = HospitalTest.Search_HospitalNameNull(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } #endregion #region 新增医院 //新增医院,医院名称为空 res_Launch = HospitalTest.AddHospital_NameNull(Global.Win_Denture, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //新增医院,省份为空 res_Launch = HospitalTest.AddHospital_ProvinceNull(Global.Win_Denture, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //新增医院,市为空 res_Launch = HospitalTest.AddHospital_CityNull(Global.Win_Denture, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增医院,区为空 res_Launch = HospitalTest.AddHospital_DistrictNull(Global.Win_Denture, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //新增医院,详细地址为空 res_Launch = HospitalTest.AddHospital_DetailNull(Global.Win_Denture, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //新增医院,上传图片超过5M res_Launch = HospitalTest.AddHospital_uploadBig(Global.Win_Denture, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } //新增医院,增加成功 res_Launch = HospitalTest.AddHospital_Succ(Global.Win_Denture, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } //新增医院,点击取消按钮,关闭新增医院窗口 res_Launch = HospitalTest.AddHospital_ClickCancle(Global.Win_Denture, out string msg11); Global.LstInfo.Add(msg11); if (!res_Launch) { return; } #endregion #region 编辑医院 //编辑医院,名称为空 res_Launch = HospitalTest.EditHospital_HospitalNameNull(Global.Win_Denture, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } //编辑医院,修改医院名称 res_Launch = HospitalTest.EditHospital_HospitalNameEdit(Global.Win_Denture, out string msg13); Global.LstInfo.Add(msg13); if (!res_Launch) { return; } //编辑医院,修改省市区 res_Launch = HospitalTest.EditHospital_Editcity(Global.Win_Denture, out string msg14); Global.LstInfo.Add(msg14); if (!res_Launch) { return; } //编辑医院,修改详细地址 res_Launch = HospitalTest.EditHospital_Detail(Global.Win_Denture, out string msg15); Global.LstInfo.Add(msg15); if (!res_Launch) { return; } //编辑医院,修改上传图片超过5M res_Launch = HospitalTest.EditHospital_UploadImageBeyond(Global.Win_Denture, out string msg16); Global.LstInfo.Add(msg16); if (!res_Launch) { return; } //编辑医院,修改上传图片超过5M res_Launch = HospitalTest.EditHospital_UploadImageBeyond2(Global.Win_Denture, out string msg17); Global.LstInfo.Add(msg17); if (!res_Launch) { return; } //编辑医院,修改上传图片 res_Launch = HospitalTest.EditHospital_UploadImage(Global.Win_Denture, out string msg18); Global.LstInfo.Add(msg18); if (!res_Launch) { return; } #endregion #region 除医院 //删除医院,删除成功 res_Launch = HospitalTest.Del_HospitalComfirm(Global.Win_Denture, out string msg19); Global.LstInfo.Add(msg19); if (!res_Launch) { return; } //删除医院,点击取消 res_Launch = HospitalTest.Del_HospitalCancle(Global.Win_Denture, out string msg20); Global.LstInfo.Add(msg20); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Denture.Close(); }
public static void LoginAllTest() { Global.LstInfo.Add("--- 登录模块 ---"); #region 登陆账号密码为空 //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin1, out string msg2, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg2); if (res_Launch) { Global.Win_Denture = appWin1; } else { return; } //测试登录窗口,账号密码为空 res_Launch = LoginDentureTest.LoginDenture_UserNull_PwdNull(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //关闭客户端 Global.Win_Denture.Close(); #endregion #region 登陆账号为空 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin2, out string msg4, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg4); if (res_Launch) { Global.Win_Denture = appWin2; } else { return; } //测试登录窗口,账号为空 res_Launch = LoginDentureTest.LoginDenture_UserNull(Global.Win_Denture, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //关闭客户端 Global.Win_Denture.Close(); #endregion #region 登陆密码为空 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin3, out string msg6, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg6); if (res_Launch) { Global.Win_Denture = appWin3; } else { return; } //测试登录窗口,密码为空 res_Launch = LoginDentureTest.LoginDenture_PwdNull(Global.Win_Denture, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //关闭客户端 Global.Win_Denture.Close(); #endregion #region 登陆成功 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; } else { return; } //测试登录窗口,登录成功 res_Launch = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //关闭客户端 Global.Win_Denture.Close(); #endregion }
public static void DoctorAllTest() { Global.LstInfo.Add("--- 医生管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; //启动成功,登录 var _login = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 医生列表 //点击医生管理菜单,加载所有医生 res_Launch = DoctorTest.Load_DoctorList(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入账号名,点击查询按钮,加载该医生 res_Launch = DoctorTest.Search_DoctoruserName(Global.Win_Denture, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //输入医生名称,点击查询按钮,加载该医生 res_Launch = DoctorTest.Search_DoctorName(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //选择是否在线,点击查询按钮,加载是否在线医生 res_Launch = DoctorTest.Search_DoctorUnOnline(Global.Win_Denture, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //医生名称为空,点击查询按钮,加载所有医生 res_Launch = DoctorTest.Search_DoctorNameNull(Global.Win_Denture, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } #endregion #region 新增医生 //新增医生,账号名为空 res_Launch = DoctorTest.AddDoctor_DoctorNameNull(Global.Win_Denture, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增医生,账号名称最少5个字 | 多于30个字 res_Launch = DoctorTest.AddDoctor_DoctorNameLength(Global.Win_Denture, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //新增医生,密码为空 res_Launch = DoctorTest.AddDoctor_PwdBull(Global.Win_Denture, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //新增医生,密码少于8位|多于30位 res_Launch = DoctorTest.AddDoctor_PwdLength(Global.Win_Denture, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } // 新增医生,邮箱地址格式不正确 res_Launch = DoctorTest.AddDoctor_RealNameLength(Global.Win_Denture, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } // 新增用户,医院为空 res_Launch = DoctorTest.AddDoctor_HospitalNull(Global.Win_Denture, out string msg11); Global.LstInfo.Add(msg11); if (!res_Launch) { return; } // 新增医生成功,同时关闭新增医生窗口 res_Launch = DoctorTest.AddDoctorSucc(Global.Win_Denture, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } // 新增医生,邮箱地址格式不正确 res_Launch = DoctorTest.AddDoctor_RealNameLength(Global.Win_Denture, out string msg13); Global.LstInfo.Add(msg13); // 新增医生,点击取消按钮,关闭新增医生窗口 res_Launch = DoctorTest.AddDoctor_ClickCancle(Global.Win_Denture, out string msg14); Global.LstInfo.Add(msg14); if (!res_Launch) { return; } #endregion #region 编辑医生 //编辑医生,账号名为空 res_Launch = DoctorTest.EditDoctor_DoctorNameNull(Global.Win_Denture, out string msg15); Global.LstInfo.Add(msg15); if (!res_Launch) { return; } //编辑医生,账号名称最少5个字|多于30个字 res_Launch = DoctorTest.EditDoctor_DoctorNameLength(Global.Win_Denture, out string msg16); Global.LstInfo.Add(msg16); if (!res_Launch) { return; } //编辑医生,不修改密码 res_Launch = DoctorTest.EditDoctor_NoEditPwd(Global.Win_Denture, out string msg17); Global.LstInfo.Add(msg17); if (!res_Launch) { return; } //编辑医生,修改密码为少于8位|多于30位 res_Launch = DoctorTest.EditDoctor_PwdLength(Global.Win_Denture, out string msg18); Global.LstInfo.Add(msg18); if (!res_Launch) { return; } //编辑医生,邮箱地址格式不正确 res_Launch = DoctorTest.EditDoctor_EmailError(Global.Win_Denture, out string msg19); Global.LstInfo.Add(msg19); if (!res_Launch) { return; } //编辑医生,真实姓名为空|真实姓名多于30个字 res_Launch = DoctorTest.EditDoctor_RealNameLength(Global.Win_Denture, out string msg20); Global.LstInfo.Add(msg20); if (!res_Launch) { return; } //编辑医生,修改所在医院 res_Launch = DoctorTest.EditDoctor_EditHospital(Global.Win_Denture, out string msg21); Global.LstInfo.Add(msg21); if (!res_Launch) { return; } //编辑医生,修改市场负责人 res_Launch = DoctorTest.EditDoctor_Marker(Global.Win_Denture, out string msg22); Global.LstInfo.Add(msg22); if (!res_Launch) { return; } //编辑医生成功,同时关闭编辑医生窗口 res_Launch = DoctorTest.EditDoctorSucc(Global.Win_Denture, out string msg23); Global.LstInfo.Add(msg23); if (!res_Launch) { return; } //编辑医生,无修改操作,点击确定按钮 res_Launch = DoctorTest.EditDoctor_NoEdit(Global.Win_Denture, out string msg24); Global.LstInfo.Add(msg24); if (!res_Launch) { return; } //编辑医生,点击取消按钮,关闭编辑医生窗口 res_Launch = DoctorTest.EditDoctor_ClickCancle(Global.Win_Denture, out string msg25); Global.LstInfo.Add(msg25); if (!res_Launch) { return; } #endregion #region 除医生 //点击删除医生按钮,弹出提醒框,选择确定 res_Launch = DoctorTest.Del_DoctorComfirm(Global.Win_Denture, out string msg26); Global.LstInfo.Add(msg26); if (!res_Launch) { return; } //点击删除医生按钮,弹出提醒框,选择取消 res_Launch = DoctorTest.Del_DoctorCancle(Global.Win_Denture, out string msg27); Global.LstInfo.Add(msg27); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Denture.Close(); }
public static void DentureAllTest() { Global.LstInfo.Add("--- 排牙师管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DenturePath, Const.DentName, Const.DentureId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Denture = appWin; //启动成功,登录 var _login = LoginDentureTest.LoginDenture_Success(Global.Win_Denture, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 查询排牙师列表 //点击排牙师管理菜单,加载所有排牙师 res_Launch = DentureTest.Load_DentureList(Global.Win_Denture, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入排牙师名称,点击查询按钮,加载该排牙师 res_Launch = DentureTest.Search_DentureName(Global.Win_Denture, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //排牙师名称为空,点击查询按钮,加载所有排牙师 res_Launch = DentureTest.Search_DentureNameNull(Global.Win_Denture, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //输入排牙师姓名,点击查询按钮,加载该排牙师 res_Launch = DentureTest.Search_DentureUserName(Global.Win_Denture, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //选择在线查询排牙师,点击查询按钮,加载所有在线排牙师 res_Launch = DentureTest.Search_DentureOnline(Global.Win_Denture, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //选择不在线查询排牙师,点击查询按钮,加载所有不在线排牙师 res_Launch = DentureTest.Search_DentureOnline2(Global.Win_Denture, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //输入排牙师名称和姓名,选择不在线查询排牙师,点击查询按钮,加载所有不在线排牙师 res_Launch = DentureTest.Search_DentureUser_Name(Global.Win_Denture, out string msg19); Global.LstInfo.Add(msg19); if (!res_Launch) { return; } #endregion #region 编辑排牙师 //编辑排牙师,账号名称为空 res_Launch = DentureTest.EditDenture_UserNameNull(Global.Win_Denture, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //编辑排牙师,账号名称最少5个字符|多于30个字符 res_Launch = DentureTest.EditDenture_UserNameLength(Global.Win_Denture, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //编辑排牙师,不修改密码 res_Launch = DentureTest.EditDenture_NoEditPwd(Global.Win_Denture, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } //编辑排牙师,修改密码为少于8位|多于30位 res_Launch = DentureTest.EditDenture_PwdLength(Global.Win_Denture, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } //编辑排牙师,邮箱地址格式不正确 res_Launch = DentureTest.EditDenture_EmailError(Global.Win_Denture, out string msg11); Global.LstInfo.Add(msg11); if (!res_Launch) { return; } //编辑排牙师,修改角色为空 res_Launch = DentureTest.EditDenture_EditRole(Global.Win_Denture, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } //编辑排牙师,真实姓名为空|真实姓名多于30个字符 res_Launch = DentureTest.EditDenture_RealNameLength(Global.Win_Denture, out string msg13); Global.LstInfo.Add(msg13); if (!res_Launch) { return; } //编辑排牙师成功,同时关闭编辑用户窗口 res_Launch = DentureTest.EditDentureSucc(Global.Win_Denture, out string msg14); Global.LstInfo.Add(msg14); if (!res_Launch) { return; } //编辑排牙师,无修改操作,点击确定按钮 res_Launch = DentureTest.EditDenture_NoEdit(Global.Win_Denture, out string msg15); Global.LstInfo.Add(msg15); if (!res_Launch) { return; } //编辑排牙师,点击取消按钮,关闭编辑用户窗口 res_Launch = DentureTest.EditDenture_ClickCancle(Global.Win_Denture, out string msg16); Global.LstInfo.Add(msg16); if (!res_Launch) { return; } #endregion #region 除用户 //点击删除用户按钮,弹出提醒框,选择确定 res_Launch = DentureTest.Del_DentureComfirm(Global.Win_Denture, out string msg17); Global.LstInfo.Add(msg17); if (!res_Launch) { return; } //点击删除用户按钮,弹出提醒框,选择取消 res_Launch = DentureTest.Del_DentureCancle(Global.Win_Denture, out string msg18); Global.LstInfo.Add(msg18); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Denture.Close(); }