public void AddPatient_Do_Not_Add_The_Same_Patient() { testPatient.FamilyName = "Иванов"; testPatient.GivenName = "Петр"; testPatient.MiddleName = "Федорович"; testPatient.BirthDate = new DateTime(1992, 05, 05); testPatient.IdPatientMIS = "1234567"; testPatient.Sex = 1; client.AddPatient(guid, idLPU, testPatient); PixService.PatientDto testPatient2 = new PixService.PatientDto(); testPatient2.FamilyName = "Иванов"; testPatient2.GivenName = "Петр"; testPatient2.MiddleName = "Федорович"; testPatient2.BirthDate = new DateTime(1992, 05, 05); testPatient2.IdPatientMIS = "1234567"; testPatient2.Sex = 1; Assert.That(() => client.AddPatient(guid, idLPU, testPatient2), Throws.Exception); }
public void AddPatient_Update_All_Data() { testPatient.FamilyName = "Иванов"; testPatient.GivenName = "Петр"; testPatient.MiddleName = "Федорович"; testPatient.BirthDate = new DateTime(1992, 05, 05); testPatient.IdPatientMIS = "1234567"; testPatient.Sex = 1; client.AddPatient(guid, idLPU, testPatient); PixService.PatientDto testPatient2 = new PixService.PatientDto(); testPatient2.FamilyName = "Петров"; testPatient2.GivenName = "Иван"; testPatient2.MiddleName = "Данилович"; testPatient2.BirthDate = new DateTime(1987, 05, 05); testPatient2.IdPatientMIS = "1234567"; testPatient2.Sex = 1; client.AddPatient(guid, idLPU, testPatient2); PixService.PatientDto[] testPatients = client.GetPatient(guid, idLPU, testPatient2, PixService.SourceType.Reg); Assert.AreEqual(testPatient2.GetHashCode(), testPatients[0].GetHashCode()); //Equals ? }
public void Init() { client = new PixService.PixServiceClient("BasicHttpBinding_IPixService"); testPatient = new PixService.PatientDto(); }