public void InsertWithAttatchFileTest() { RegistationService target = new RegistationService(); // TODO: Initialize to an appropriate value //RegistrationType registerType = new RegistrationType(); // TODO: Initialize to an appropriate value DTO.Registration x = new DTO.Registration(); // TODO: Initialize to an appropriate value x.ID = DateTime.Now.Year.ToString("0000").Substring(2, 2) + DateTime.Now.ToString("MMddHHmmssfff"); x.ID_CARD_NO = "3100800728835"; x.BIRTH_DATE = DateTime.Now.AddYears(-21); x.MEMBER_TYPE = "1"; x.PRE_NAME_CODE = "3"; x.NAMES = "ชินบุตร"; x.LASTNAME = "สุวรรณเลิศวัฒนา"; x.NATIONALITY = "001"; x.SEX = "M"; x.EDUCATION_CODE = "05"; x.EMAIL = "*****@*****.**"; x.IMPORT_STATUS = "N"; List <RegistrationAttatchFile> listAttatchFile = new List <RegistrationAttatchFile>(); // TODO: Initialize to an appropriate value //listAttatchFile.Add(new RegistrationAttatchFile //{ //}); ResponseService <DTO.Registration> expected = null; // TODO: Initialize to an appropriate value ResponseService <DTO.Registration> actual; actual = target.InsertWithAttatchFile(DTO.RegistrationType.General, x, listAttatchFile); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
internal virtual IRegistrationService CreateIRegistrationService() { // TODO: Instantiate an appropriate concrete class. ctx = new IAS.DataServices.Test.Mocking.MockIASPersonEntities(); IRegistrationService target = new RegistationService(ctx); return(target); }
public void GetPersonalDetailByIDCardTest() { //string id = "3414242344334"; RegistationService target = new RegistationService(); // TODO: Initialize to an appropriate value string idCard = "3414242344334"; // TODO: Initialize to an appropriate value ResponseService <Person> expected = null; // TODO: Initialize to an appropriate value ResponseService <Person> actual; actual = target.GetPersonalDetailByIDCard(idCard); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void UpdateTestTest() { IAS.DAL.Interfaces.IIASPersonEntities ctx = new IAS.DataServices.Test.Mocking.MockIASPersonEntities(); String id = OracleDB.GetGenAutoId(); AG_IAS_REGISTRATION_T regis1 = new AG_IAS_REGISTRATION_T() { ID = id, ID_CARD_NO = "1236277389234", NAMES = "MyName", LASTNAME = "LastName" }; ctx.AG_IAS_REGISTRATION_T.AddObject(regis1); RegistationService target = new RegistationService(ctx); // TODO: Initialize to an appropriate value DTO.Registration entity = new DTO.Registration() { ID = id, ID_CARD_NO = "1234567890123", NAMES = "NewName", LASTNAME = "LastName" }; // TODO: Initialize to an appropriate value ResponseService <DTO.Registration> expected = new ResponseService <DTO.Registration>(); // TODO: Initialize to an appropriate value expected.DataResponse = new DTO.Registration() { ID = id, ID_CARD_NO = "1234567890123", NAMES = "NewName", LASTNAME = "LastName" }; ResponseService <DTO.Registration> actual; actual = target.Update(entity); Assert.AreEqual(expected.DataResponse.ID, actual.DataResponse.ID); Assert.AreEqual(expected.DataResponse.ID_CARD_NO, actual.DataResponse.ID_CARD_NO); Assert.AreEqual(expected.DataResponse.NAMES, actual.DataResponse.NAMES); Assert.AreEqual(expected.DataResponse.LASTNAME, actual.DataResponse.LASTNAME); Assert.AreNotEqual(expected.DataResponse.UPDATED_DATE, actual.DataResponse.UPDATED_DATE); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void GetPersonalDetailByIDCard() { RegistationService target = new RegistationService(); // TODO: Initialize to an appropriate value RegistrationType registerType = new RegistrationType(); // TODO: Initialize to an appropriate value DTO.Registration entity = new DTO.Registration(); // TODO: Initialize to an appropriate value DTO.ResponseService <DTO.Person> expected = new DTO.ResponseService <DTO.Person>(); // TODO: Initialize to an appropriate value DTO.ResponseService <DTO.Person> actual; entity.ID_CARD_NO = "6992298475033"; entity.MEMBER_TYPE = ((int)DTO.MemberType.Insurance).ToString(); entity.NAMES = "กกดกเ"; entity.LASTNAME = "ddddddd"; entity.EMAIL = "*****@*****.**"; actual = target.GetPersonalDetailByIDCard("5210280819012"); Assert.AreEqual(expected, actual); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void EntityValidationTest() { RegistationService target = new RegistationService(); // TODO: Initialize to an appropriate value RegistrationType registerType = new RegistrationType(); // TODO: Initialize to an appropriate value DTO.Registration entity = new DTO.Registration(); // TODO: Initialize to an appropriate value ResponseMessage <bool> expected = new ResponseMessage <bool>(); // TODO: Initialize to an appropriate value expected.ResultMessage = true; ResponseMessage <bool> actual; entity.ID_CARD_NO = "0065322327231"; entity.MEMBER_TYPE = ((int)DTO.MemberType.Insurance).ToString(); entity.NAMES = "กกดกเ"; entity.LASTNAME = "ddddddd"; entity.EMAIL = "*****@*****.**"; actual = target.EntityValidation(DTO.RegistrationType.Insurance, entity); Assert.AreEqual(expected.ResultMessage, actual.ResultMessage); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void GetRegistrationsByCriteriaTest() { RegistationService target = new RegistationService(); // TODO: Initialize to an appropriate value GetReistrationByCriteriaRequest request = new GetReistrationByCriteriaRequest(); // TODO: Initialize to an appropriate value ResponseService <DataSet> expected = new ResponseService <DataSet>(); // TODO: Initialize to an appropriate value ResponseService <DataSet> actual; //Status 1 = รออนุมัติ(สมัคร), Status 2 = อนุมัติ(สมัคร), Status 3 = ไม่อนุมัติ(สมัคร) //GetRegistrationsByCriteria(txtFirstNameAfterReg.Text, txtLastNameAfterReg.Text, null, null, txtIDNumberAfterReg.Text, null, txtEmailAfterReg.Text, null, Session["RegStatus"].ToString(), 1, 20, "2"); request.FirstName = "ดาวรุ่งรตา"; request.LastName = "วงษ์ไกร"; request.MemberTypeCode = "1"; request.IdCard = "3670800584855"; request.PageNo = 1; request.Status = "2"; request.RecordPerPage = 20; request.Para = "2"; actual = target.GetRegistrationsByCriteria(request); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }