public ViewNeedClass CheckNeed(long doctorId) { if (DoctorEN.GetService().GetCount(new FilterExpression(vDoctor.ColumnNames.DoctorID, doctorId)) < 1) { return(new ViewNeedClass("Basic doctor information not found. Please fill it first", "Doctor-Form")); } return(null); }
public void SearchByClinicPhoneNumber2() { DoctorSearchByClinicPhoneNumberSP p = new DoctorSearchByClinicPhoneNumberSP(); p.PhoneNumber = "888222"; var target = DoctorEN.GetService(""); IList <vDoctor> list = target.SearchByClinicPhoneNumber(p); Assert.IsTrue(list.Count >= 1, "888222 should find several items in phone number"); }
public void SearchByClinicPhoneNumber() { DoctorSearchByClinicPhoneNumberSP p = new DoctorSearchByClinicPhoneNumberSP(); p.PhoneNumber = "888-222-3445"; var target = DoctorEN.GetService(""); IList <vDoctor> list = target.SearchByClinicPhoneNumber(p); Assert.AreEqual(1, list.Count, "SearchByClinicPhoneNumber should find only one doctor"); Assert.AreEqual(list[0].DoctorID, TestEnums.User.constDoctorID, "SearchByClinicPhoneNumber should find TestEnums.User.constDoctorID doctor"); }
public void SearchByClinicPhoneNumber3() { DoctorSearchByClinicPhoneNumberSP p = new DoctorSearchByClinicPhoneNumberSP(); // invalid number shouldn't have any results p.PhoneNumber = "AnInvalidNumber"; var target = DoctorEN.GetService(""); IList <vDoctor> list = target.SearchByClinicPhoneNumber(p); Assert.IsTrue(list.Count == 0, "anInvalidNumber should not have any results"); }
//private const string url = public override string Check(User userInfo) { var service = DoctorEN.GetService(""); if (service.GetCount(new FilterExpression(vDoctor.ColumnNames.DoctorID, userInfo.UserID)) == 1) { return(null); } else { // if our user was doctor and he doesn't have doctor's information var userInRoleService = UserInRoleEN.GetService(""); var rolesList = userInRoleService.GetRolesIDUserID(userInfo.UserID.ToString()); if (rolesList.Contains((long)EntityEnums.RoleEnum.Doctor)) { return("Register/Doctor"); } } return(null); }
// //You can use the following additional attributes as you write your tests: // //Use ClassInitialize to run code before running the first test in the class //[ClassInitialize()] //public static void MyClassInitialize(TestContext testContext) //{ //} // //Use ClassCleanup to run code after all tests in a class have run //[ClassCleanup()] //public static void MyClassCleanup() //{ //} // //Use TestInitialize to run code before running each test //[TestInitialize()] //public void MyTestInitialize() //{ //} // //Use TestCleanup to run code after each test has run //[TestCleanup()] //public void MyTestCleanup() //{ //} // #endregion private IDoctorService CreateService() { return(DoctorEN.GetService("")); }