public void AddPatient_With_Invalid_BirthPlace() { testPatient.FamilyName = "Иванов"; testPatient.GivenName = "Петр"; testPatient.MiddleName = "Федорович"; testPatient.BirthDate = new DateTime(1992, 05, 05); testPatient.IdPatientMIS = "1234567"; testPatient.Sex = 1; testPatient.IdLivingAreaType = 1; PixService.BirthPlaceDto birthPlace = new PixService.BirthPlaceDto(); birthPlace.Country = "rtetr"; birthPlace.City = "Sfsfs"; birthPlace.Region = "sfsdfs"; testPatient.BirthPlace = birthPlace; Assert.That(() => client.AddPatient(guid, idLPU, testPatient), Throws.ArgumentException); }
public void AddPatient_With_Valid_BirthPlace() { testPatient.FamilyName = "Иванов"; testPatient.GivenName = "Петр"; testPatient.MiddleName = "Федорович"; testPatient.BirthDate = new DateTime(1992, 05, 05); testPatient.IdPatientMIS = "1234567"; testPatient.Sex = 1; PixService.BirthPlaceDto birthPlace = new PixService.BirthPlaceDto(); birthPlace.Country = "Россия"; birthPlace.City = "Санкт-Петербург"; birthPlace.Region = "Северо-Западный регион"; testPatient.BirthPlace = birthPlace; client.AddPatient(guid, idLPU, testPatient); PixService.PatientDto[] testPatients = client.GetPatient(guid, idLPU, testPatient, PixService.SourceType.Reg); Assert.AreEqual("Россия", testPatients[0].BirthPlace.Country); Assert.AreEqual("Санкт-Петербург", testPatients[0].BirthPlace.City); Assert.AreEqual("Северо-Западный регион", testPatients[0].BirthPlace.Region); }