public void ToFatherOrMother_PnrWithData_CorrectDate( [Values("1234", "12345678")] string pnr) { var ret = ParentsInformationType.ToFatherOrMother(par => Guid.NewGuid(), pnr, DateTime.Today); Assert.AreEqual(DateTime.Today, ret[0].Virkning.FraTidspunkt.ToDateTime()); }
public void ToFatherOrMother_PnrWithData_NullEndDate( [Values("1234", "12345678")] string pnr) { var ret = ParentsInformationType.ToFatherOrMother(par => Guid.NewGuid(), pnr, DateTime.Today); Assert.Null(ret[0].Virkning.TilTidspunkt.ToDateTime()); }
public void ToFatherOrMother_InvalidPnr_One( [Values("1234", "12345678")] string pnr) { var ret = ParentsInformationType.ToFatherOrMother(par => Guid.NewGuid(), pnr, null); Assert.AreEqual(1, ret.Length); }
public void ToFatherOrMother_Null_Zero( [Values(null, "")] string pnr) { var ret = ParentsInformationType.ToFatherOrMother(par => Guid.NewGuid(), pnr, null); Assert.AreEqual(0, ret.Length); }
public void ToPersonRelationType_InvalidType_Exception( [Values(0, 1, -2, 7)] decimal relType) { var auth = new ParentalAuthorityType() { RelationshipType = relType }; var par = new ParentsInformationType(); auth.ToPersonRelationType(par, cpr => Guid.NewGuid()); }
public void ToMother_PNRWithDate_EmptyEndDate( [Values("123456789", "0123456789", "1234567890")] string pnr) { var info = new ParentsInformationType() { MotherPNR = pnr, MotherDate = DateTime.Today }; var ret = info.ToMother(GetUuid); Assert.Null(ret[0].Virkning.TilTidspunkt.ToDateTime()); }
public void ToMother_PNRWithDate_CorrectStartDate( [Values("123456789", "0123456789", "1234567890")] string pnr) { var info = new ParentsInformationType() { MotherPNR = pnr, MotherDate = DateTime.Today }; var ret = info.ToMother(GetUuid); Assert.AreEqual(DateTime.Today, ret[0].Virkning.FraTidspunkt.ToDateTime()); }
public void ToMother_PNR_PassedCorrectly( [Values("123456789", "0123456789", "1234567890")] string pnr) { var info = new ParentsInformationType() { MotherPNR = pnr }; var ret = info.ToMother(GetUuid); pnr = Converters.ToPnrStringOrNull(pnr); Assert.AreEqual(pnr, LatestPnr); }