Exemplo n.º 1
0
            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());
            }
Exemplo n.º 2
0
            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());
            }
Exemplo n.º 3
0
            public void ToFatherOrMother_InvalidPnr_One(
                [Values("1234", "12345678")] string pnr)
            {
                var ret = ParentsInformationType.ToFatherOrMother(par => Guid.NewGuid(), pnr, null);

                Assert.AreEqual(1, ret.Length);
            }
Exemplo n.º 4
0
            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());
            }
Exemplo n.º 6
0
            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());
            }
Exemplo n.º 7
0
            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());
            }
Exemplo n.º 8
0
            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);
            }