public void ToFoedestedNavn_NameWithNoDateOrHistory_Null() { var pnr = Utilities.RandomCprNumberString(); var res = new EgenskabInterval() { //BasicInformation = new PersonInformationType() { PNR = pnr, Birthdate = CprBroker.Utilities.Strings.PersonNumberToDate(pnr) }, //HistoricalNames = new INameSource[0], Data = new List <ITimedType>(new ITimedType[] { new CurrentNameInformationType() { PNR = pnr, FirstName_s = "1", LastName = "2" } }) }; var ret = res.ToFoedestedNavn(); Assert.IsNullOrEmpty(ret); }
public void ToFoedestedNavn_NameWithFarDate_Null( [Values(15, 20, 30)] int dayOffset) { string pnr = Utilities.RandomCprNumberString(); DateTime birthDate = PartInterface.Strings.PersonNumberToDate(pnr).Value; DateTime nameDate = birthDate.AddDays(dayOffset); var res = new EgenskabInterval() { //BasicInformation = new PersonInformationType() { PNR = pnr, Birthdate = birthDate }, //HistoricalNames = new INameSource[0], Data = new List <ITimedType>(new ITimedType[] { new CurrentNameInformationType() { PNR = pnr, FirstName_s = "1", LastName = "2", NameStartDate = nameDate } }) }; var ret = res.ToFoedestedNavn(); Assert.IsNullOrEmpty(ret); }