public void T520_Search_Invalid(Part.SoegInputType1 searchCriteria) { var result = TestRunner.PartService.Search(searchCriteria); Assert.NotNull(result); Assert.IsNull(result.Idliste); ValidateInvalid(result.StandardRetur); }
public void T510_Search_Name(string cprNumber) { var personUuid = TestRunner.PartService.GetUuid(cprNumber); Validate(personUuid); Part.LaesInputType input = new Part.LaesInputType() { UUID = personUuid.UUID, }; var personObject = TestRunner.PartService.Read(input); Validate(new Guid(personUuid.UUID), personObject, TestRunner.PartService); var personRegistration = personObject.LaesResultat.Item as Part.RegistreringType1; var searchCriteria = new Part.SoegInputType1() { SoegObjekt = new Part.SoegObjektType() { SoegAttributListe = new Part.SoegAttributListeType() { SoegEgenskab = new Part.SoegEgenskabType[] { new Part.SoegEgenskabType() { NavnStruktur = new Part.NavnStrukturType() { PersonNameStructure = new Part.PersonNameStructureType() { PersonGivenName = personRegistration.AttributListe.Egenskab[0].NavnStruktur.PersonNameStructure.PersonGivenName, PersonMiddleName = personRegistration.AttributListe.Egenskab[0].NavnStruktur.PersonNameStructure.PersonMiddleName, PersonSurnameName = personRegistration.AttributListe.Egenskab[0].NavnStruktur.PersonNameStructure.PersonSurnameName, } } } } } } }; var result = TestRunner.PartService.Search(searchCriteria); Assert.NotNull(result, "Search result"); Validate(result.StandardRetur); Assert.IsNotNull(result.Idliste, "Search result ids"); Assert.AreEqual(1, result.Idliste.Length, "Number of search results"); Assert.AreNotEqual(Guid.Empty, result.Idliste[0], "Empty laesResultat uuid from search"); Assert.AreEqual(personUuid.UUID, result.Idliste[0], "Search result returns wrong uuids"); }
public void T500_Search_CprNumber(string cprNumber) { var personUuid = TestRunner.PartService.GetUuid(cprNumber).UUID; var searchCriteria = new Part.SoegInputType1() { SoegObjekt = new Part.SoegObjektType() { BrugervendtNoegleTekst = cprNumber } }; var result = TestRunner.PartService.Search(searchCriteria); Assert.NotNull(result, "Search result"); Validate(result.StandardRetur); Assert.IsNotNull(result.Idliste, "Search result ids"); Assert.AreEqual(1, result.Idliste.Length, "Number of search results"); Assert.AreNotEqual(Guid.Empty, result.Idliste[0], "Empty laesResultat uuid from search"); Assert.AreEqual(personUuid.ToString(), result.Idliste[0], "Search result returns wrong uuids"); }