public void GetUuidsByCriteria_EmptyCriteriaWithRegistratioId_NonZero() { var soegObject = new SoegObjektType(); using (var dataContext = new PartDataContext()) { var pRegIds = dataContext.PersonRegistrations.Select(pr => pr.PersonRegistrationId).Take(2).ToArray(); var ret = PersonRegistrationKey.GetByCriteria(dataContext, soegObject, pRegIds); Assert.IsNotEmpty(ret.ToArray()); } }
public void GetUuidsByCriteria_MunicipalityCode_NotZero([Values("851")] string municipalityCode) { var soegObject = new SoegObjektType() { SoegAttributListe = new SoegAttributListeType() { SoegRegisterOplysning = new RegisterOplysningType[] { new RegisterOplysningType() { Item = new CprBorgerType() { FolkeregisterAdresse = new AdresseType() { Item = new DanskAdresseType() { AddressComplete = new AddressCompleteType() { AddressAccess = new AddressAccessType() { MunicipalityCode = municipalityCode } } } } } } } } }; using (var dataContext = new PartDataContext()) { var ret = PersonRegistrationKey.GetByCriteria(dataContext, soegObject, null); var first = ret.First(); Assert.NotNull(first); } }
public void GetUuidsByCriteria_MunicipalityCodeAndRandomPersonRegistratioId_Zero([Values("851")] string municipalityCode) { var soegObject = new SoegObjektType() { SoegAttributListe = new SoegAttributListeType() { SoegRegisterOplysning = new RegisterOplysningType[] { new RegisterOplysningType() { Item = new CprBorgerType() { FolkeregisterAdresse = new AdresseType() { Item = new DanskAdresseType() { AddressComplete = new AddressCompleteType() { AddressAccess = new AddressAccessType() { MunicipalityCode = municipalityCode } } } } } } } } }; using (var dataContext = new PartDataContext()) { var ret = PersonRegistrationKey.GetByCriteria(dataContext, soegObject, Guid.NewGuid(), Guid.NewGuid()); Assert.IsEmpty(ret.ToArray()); } }