/// <summary> /// 医生管理员登录 医生管理测试 /// </summary> public static void DoctorAdmin_DoctorManageAllTest() { Global.LstInfo.Add("--- (医生管理员端)医生管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; //启动成功,登录 var _login = LoginDoctorTest.LoginSuperDoctor_Success(Global.Win_Dentlab, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } var d = DoctorManageTest(res_Launch); if (d) { //关闭客户端 Global.Win_Dentlab.Close(); } }
/// <summary> /// 医生管理员新增订单测试 /// </summary> public static void DoctorAdmin_AddOrderTest() { Global.LstInfo.Add("--- 登录模块 ---"); #region 登陆医生 //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; } else { return; } //测试登录窗口,登录成功 res_Launch = LoginDoctorTest.LoginSuperDoctor_Success(Global.Win_Dentlab, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //点击新增订单 res_Launch = AddOrderTest.AddOrder_Succ(Global.Win_Dentlab, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //关闭客户端 Global.Win_Dentlab.Close(); #endregion }
/// <summary> /// 技工厂登录 医生管理测试 /// </summary> public static void Factory_DoctorManageAllTest() { Global.LstInfo.Add("--- (技工厂端)医生管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; //启动成功,登录 var _login = LoginDoctorTest.LoginFactory_Success(Global.Win_Dentlab, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } var d = DoctorManageTest(res_Launch); if (d) { //技工厂有匹配技师权限 var m = MatchingTechnicianTest(d); if (m) { //关闭客户端 Global.Win_Dentlab.Close(); } } }
public static void TechnicianAllTest() { Global.LstInfo.Add("--- 订单管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; //启动成功,登录 var _login = LoginDoctorTest.LoginTechnician_Success(Global.Win_Dentlab, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 订单查询 //点击订单列表 res_Launch = TechnicianListTest.Load_OrderList(Global.Win_Dentlab, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入订单ID进行查询 res_Launch = TechnicianListTest.Search_OrderID(Global.Win_Dentlab, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //不输入内容点击查询 res_Launch = TechnicianListTest.Search_OrderIDNull(Global.Win_Dentlab, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //根据状态进行查询 res_Launch = TechnicianListTest.Search_Statusl(Global.Win_Dentlab, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //输入医生名称查询 res_Launch = TechnicianListTest.Search_DoctorName(Global.Win_Dentlab, out string msg5); if (!res_Launch) { return; } //输入生产批号查询 res_Launch = TechnicianListTest.Search_UniqueNumber(Global.Win_Dentlab, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Dentlab.Close(); }
public static void HospitalAllTest() { Global.LstInfo.Add("--- (技工厂)医院管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; //启动成功,登录 var _login = LoginDoctorTest.LoginFactory_Success(Global.Win_Dentlab, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 医院列表 //点击医院管理菜单,加载所有医院 res_Launch = FactoryHospitalTest.Load_HospitalList(Global.Win_Dentlab, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入医院名称,点击查询按钮,加载该医院 res_Launch = FactoryHospitalTest.Search_HospitalName(Global.Win_Dentlab, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //医院名称为空,点击查询按钮,加载所有医院 res_Launch = FactoryHospitalTest.Search_HospitalNameNull(Global.Win_Dentlab, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } #endregion #region 新增医院 //新增医院,医院名称为空 res_Launch = FactoryHospitalTest.AddHospital_NameNull(Global.Win_Dentlab, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //新增医院,省份为空 res_Launch = FactoryHospitalTest.AddHospital_ProvinceNull(Global.Win_Dentlab, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //新增医院,市为空 res_Launch = FactoryHospitalTest.AddHospital_CityNull(Global.Win_Dentlab, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增医院,区为空 res_Launch = FactoryHospitalTest.AddHospital_DistrictNull(Global.Win_Dentlab, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //新增医院,详细地址为空 res_Launch = FactoryHospitalTest.AddHospital_DetailNull(Global.Win_Dentlab, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //新增医院,选择技工厂为空 //res_Launch = FactoryHospitalTest.AddHospital_SelectNull(Global.Win_Dentlab, out string msg9); //Global.LstInfo.Add(msg9); //if (!res_Launch) return; //新增医院,上传图片超过5M res_Launch = FactoryHospitalTest.AddHospital_uploadBig(Global.Win_Dentlab, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } //新增医院,增加成功 res_Launch = FactoryHospitalTest.AddHospital_Succ(Global.Win_Dentlab, out string msg11); Global.LstInfo.Add(msg11); if (!res_Launch) { return; } //新增医院,点击取消按钮,关闭新增医院窗口 res_Launch = FactoryHospitalTest.AddHospital_ClickCancle(Global.Win_Dentlab, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } #endregion #region 编辑医院 //编辑医院,名称为空 res_Launch = FactoryHospitalTest.EditHospital_HospitalNameNull(Global.Win_Dentlab, out string msg13); Global.LstInfo.Add(msg13); if (!res_Launch) { return; } //编辑医院,修改医院名称 res_Launch = FactoryHospitalTest.EditHospital_HospitalNameEdit(Global.Win_Dentlab, out string msg14); Global.LstInfo.Add(msg14); if (!res_Launch) { return; } //编辑医院,修改省市区 res_Launch = FactoryHospitalTest.EditHospital_Editcity(Global.Win_Dentlab, out string msg15); Global.LstInfo.Add(msg15); if (!res_Launch) { return; } //编辑医院,修改详细地址 res_Launch = FactoryHospitalTest.EditHospital_Detail(Global.Win_Dentlab, out string msg16); Global.LstInfo.Add(msg16); if (!res_Launch) { return; } //编辑医院,修改技工厂 //res_Launch = FactoryHospitalTest.EditHospital_Factory(Global.Win_Dentlab, out string msg17); //Global.LstInfo.Add(msg17); //if (!res_Launch) return; //编辑医院,修改上传图片超过5M res_Launch = FactoryHospitalTest.EditHospital_UploadImageBeyond(Global.Win_Dentlab, out string msg18); Global.LstInfo.Add(msg18); if (!res_Launch) { return; } //编辑医院,修改上传图片超过5M res_Launch = FactoryHospitalTest.EditHospital_UploadImageBeyond2(Global.Win_Dentlab, out string msg19); Global.LstInfo.Add(msg19); if (!res_Launch) { return; } //编辑医院,修改上传图片 res_Launch = FactoryHospitalTest.EditHospital_UploadImage(Global.Win_Dentlab, out string msg20); Global.LstInfo.Add(msg20); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Dentlab.Close(); }
public static void DoctorAllTest() { Global.LstInfo.Add("--- 上传报告 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; //启动成功,登录 var _login = LoginDoctorTest.LoginTechnician_Success(Global.Win_Dentlab, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 报告 //点击订单列表 res_Launch = UploadReportTest.Load_OrderList(Global.Win_Dentlab, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //上传报告缺少XML文件 res_Launch = UploadReportTest.UpLoad_OrderReportXMLNull(Global.Win_Dentlab, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //上传报告缺少XLS文件 res_Launch = UploadReportTest.UpLoad_OrderReportXLSNull(Global.Win_Dentlab, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //上传报告缺少PDF文件 res_Launch = UploadReportTest.UpLoad_OrderReportPDFNull(Global.Win_Dentlab, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //上传报告成功 res_Launch = UploadReportTest.UpLoad_OrderReport(Global.Win_Dentlab, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Dentlab.Close(); }
public static void FactoryAdminAllTest() { Global.LstInfo.Add("--- 技师管理模块 ---"); //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; //启动成功,登录 var _login = LoginDoctorTest.LoginFactory_Success(Global.Win_Dentlab, out string msg_login); Global.LstInfo.Add(msg_login); //如果登录失败,返回 if (!_login) { return; } } else { return; } #region 技师列表 //点击技师管理菜单,加载所有技师 res_Launch = FactoryTechnicianTest.Load_TechnicianList(Global.Win_Dentlab, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //输入账号名,点击查询按钮,加载该技师 res_Launch = FactoryTechnicianTest.Search_TechnicianName(Global.Win_Dentlab, out string msg2); Global.LstInfo.Add(msg2); if (!res_Launch) { return; } //输入技师姓名,点击查询按钮,加载该技师 res_Launch = FactoryTechnicianTest.Search_TechnicianUserName(Global.Win_Dentlab, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //选择是否在线,点击查询按钮,加载是否在线技师 res_Launch = FactoryTechnicianTest.Search_TechnicianOnline2(Global.Win_Dentlab, out string msg28); Global.LstInfo.Add(msg28); if (!res_Launch) { return; } //选择是否在线,点击查询按钮,加载是否在线技师 res_Launch = FactoryTechnicianTest.Search_TechnicianOnline(Global.Win_Dentlab, out string msg4); Global.LstInfo.Add(msg4); if (!res_Launch) { return; } //技师名称为空,点击查询按钮,加载所有技师 res_Launch = FactoryTechnicianTest.Search_TechnicianNameNull(Global.Win_Dentlab, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } #endregion #region 新增技师 //新增技师,账号名为空 res_Launch = FactoryTechnicianTest.AddTechnician_UserNameNull(Global.Win_Dentlab, out string msg6); Global.LstInfo.Add(msg6); if (!res_Launch) { return; } //新增技师,账号名称最少5个字 | 多于30个字 res_Launch = FactoryTechnicianTest.AddTechnician_UserNameLength(Global.Win_Dentlab, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //新增技师,密码为空 res_Launch = FactoryTechnicianTest.AddTechnician_PwdNull(Global.Win_Dentlab, out string msg8); Global.LstInfo.Add(msg8); if (!res_Launch) { return; } //新增技师,密码少于8位|多于30位 res_Launch = FactoryTechnicianTest.AddTechnician_PwdLength(Global.Win_Dentlab, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } // 新增技师,邮箱地址格式不正确 res_Launch = FactoryTechnicianTest.AddTechnician_EmailError(Global.Win_Dentlab, out string msg10); Global.LstInfo.Add(msg10); if (!res_Launch) { return; } // 新增技师,真实姓名为空|真实姓名多于30个字 res_Launch = FactoryTechnicianTest.AddTechnician_RealNameLength(Global.Win_Dentlab, out string msg13); Global.LstInfo.Add(msg13); if (!res_Launch) { return; } // 新增技师,身份证不正确 AddTechnician_IDcard res_Launch = FactoryTechnicianTest.AddTechnician_IDcard(Global.Win_Dentlab, out string msg30); Global.LstInfo.Add(msg30); if (!res_Launch) { return; } // 新增技师,手机号码不正确 AddTechnician_Phone res_Launch = FactoryTechnicianTest.AddTechnician_Phone(Global.Win_Dentlab, out string msg29); Global.LstInfo.Add(msg29); if (!res_Launch) { return; } // 新增技师成功,同时关闭新增技师窗口 res_Launch = FactoryTechnicianTest.AddTechnicianSucc(Global.Win_Dentlab, out string msg12); Global.LstInfo.Add(msg12); if (!res_Launch) { return; } // 新增技师,点击取消按钮,关闭新增技师窗口 res_Launch = FactoryTechnicianTest.AddTechnician_ClickCancle(Global.Win_Dentlab, out string msg14); Global.LstInfo.Add(msg14); if (!res_Launch) { return; } #endregion #region 编辑技师 //编辑技师,账号名为空 res_Launch = FactoryTechnicianTest.EditTechnician_UserNameNull(Global.Win_Dentlab, out string msg15); Global.LstInfo.Add(msg15); if (!res_Launch) { return; } //编辑技师,账号名称最少5个字|多于30个字 res_Launch = FactoryTechnicianTest.EditTechnician_UserNameLength(Global.Win_Dentlab, out string msg16); Global.LstInfo.Add(msg16); if (!res_Launch) { return; } //编辑技师,不修改密码 res_Launch = FactoryTechnicianTest.EditTechnician_NoEditPwd(Global.Win_Dentlab, out string msg17); Global.LstInfo.Add(msg17); if (!res_Launch) { return; } //编辑技师,修改密码为少于8位|多于30位 res_Launch = FactoryTechnicianTest.EditTechnician_PwdLength(Global.Win_Dentlab, out string msg18); Global.LstInfo.Add(msg18); if (!res_Launch) { return; } //编辑技师,邮箱地址格式不正确 res_Launch = FactoryTechnicianTest.EditTechnician_EmailError(Global.Win_Dentlab, out string msg19); Global.LstInfo.Add(msg19); if (!res_Launch) { return; } //编辑技师,真实姓名为空|真实姓名多于30个字 res_Launch = FactoryTechnicianTest.EditTechnician_RealNameLength(Global.Win_Dentlab, out string msg20); Global.LstInfo.Add(msg20); if (!res_Launch) { return; } //编辑技师,身份证验证 res_Launch = FactoryTechnicianTest.EditTechnician_IDCard(Global.Win_Dentlab, out string msg31); Global.LstInfo.Add(msg31); if (!res_Launch) { return; } //编辑技师,手机号验证 res_Launch = FactoryTechnicianTest.EditTechnician_Phone(Global.Win_Dentlab, out string msg32); Global.LstInfo.Add(msg32); if (!res_Launch) { return; } //编辑技师,修改状态 res_Launch = FactoryTechnicianTest.EditTechnician_EditRole(Global.Win_Dentlab, out string msg21); Global.LstInfo.Add(msg21); if (!res_Launch) { return; } //编辑技师成功,同时关闭编辑技师窗口 res_Launch = FactoryTechnicianTest.EditTechnicianSucc(Global.Win_Dentlab, out string msg23); Global.LstInfo.Add(msg23); if (!res_Launch) { return; } //编辑技师,无修改操作,点击确定按钮 res_Launch = FactoryTechnicianTest.EditTechnician_NoEdit(Global.Win_Dentlab, out string msg24); Global.LstInfo.Add(msg24); if (!res_Launch) { return; } //编辑技师,点击取消按钮,关闭编辑技师窗口 res_Launch = FactoryTechnicianTest.EditTechnician_ClickCancle(Global.Win_Dentlab, out string msg25); Global.LstInfo.Add(msg25); if (!res_Launch) { return; } #endregion #region 除技师 //点击删除技师按钮,弹出提醒框,选择确定 res_Launch = FactoryTechnicianTest.Del_TechnicianComfirm(Global.Win_Dentlab, out string msg26); Global.LstInfo.Add(msg26); if (!res_Launch) { return; } //点击删除技师按钮,弹出提醒框,选择取消 res_Launch = FactoryTechnicianTest.Del_TechnicianCancle(Global.Win_Dentlab, out string msg27); Global.LstInfo.Add(msg27); if (!res_Launch) { return; } #endregion //关闭客户端 Global.Win_Dentlab.Close(); }
public static void LoginAllTest() { Global.LstInfo.Add("--- 登录模块 ---"); #region 登陆医生成功 //启动一个客户端 bool res_Launch = WinHelp.Launch(out Window appWin, out string msg, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg); if (res_Launch) { Global.Win_Dentlab = appWin; } else { return; } //测试登录窗口,登录成功 res_Launch = LoginDoctorTest.LoginDoctor_Success(Global.Win_Dentlab, out string msg1); Global.LstInfo.Add(msg1); if (!res_Launch) { return; } //关闭客户端 Global.Win_Dentlab.Close(); #endregion #region 登陆账号密码为空 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin1, out string msg2, Const.DoctorPath, Const.DentName, Const.DoctorId); Global.LstInfo.Add(msg2); if (res_Launch) { Global.Win_Dentlab = appWin1; } else { return; } //测试登录窗口,账号密码为空 res_Launch = LoginDoctorTest.LoginDoctor_UserNull_PwdNull(Global.Win_Dentlab, out string msg3); Global.LstInfo.Add(msg3); if (!res_Launch) { return; } //关闭客户端 Global.Win_Dentlab.Close(); #endregion #region 登陆账号为空 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin2, out string msg4, Const.DoctorPath, Const.DentName, Const.DoctorId); Global.LstInfo.Add(msg4); if (res_Launch) { Global.Win_Dentlab = appWin2; } else { return; } //测试登录窗口,账号为空 res_Launch = LoginDoctorTest.LoginDoctor_UserNull(Global.Win_Dentlab, out string msg5); Global.LstInfo.Add(msg5); if (!res_Launch) { return; } //关闭客户端 Global.Win_Dentlab.Close(); #endregion #region 登陆密码为空 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin3, out string msg6, Const.DoctorPath, Const.DentName, Const.DoctorId); Global.LstInfo.Add(msg6); if (res_Launch) { Global.Win_Dentlab = appWin3; } else { return; } //测试登录窗口,密码为空 res_Launch = LoginDoctorTest.LoginDoctor_PwdNull(Global.Win_Dentlab, out string msg7); Global.LstInfo.Add(msg7); if (!res_Launch) { return; } //关闭客户端 Global.Win_Dentlab.Close(); #endregion #region 登陆技工厂成功 //启动一个客户端 res_Launch = WinHelp.Launch(out Window appWin4, out string msg8, Const.DoctorPath, Const.DoctorClientName, Const.DoctorId); Global.LstInfo.Add(msg8); if (res_Launch) { Global.Win_Dentlab = appWin4; } else { return; } //测试登录窗口,登录成功 res_Launch = LoginDoctorTest.LoginFactory_Success(Global.Win_Dentlab, out string msg9); Global.LstInfo.Add(msg9); if (!res_Launch) { return; } //关闭客户端 Global.Win_Dentlab.Close(); #endregion }