Esempio n. 1
0
            public void ToBirthdate_Empty_Null()
            {
                var inf = new PersonInformationType();
                var ret = inf.ToBirthdate();

                Assert.Null(ret);
            }
Esempio n. 2
0
 public void PersonGenderCodeType_Other_Exception(
     [Values('s', ' ', '2')] char gender)
 {
     var info = new PersonInformationType()
     {
         Gender = gender
     };
     var ret = info.ToPersonGenderCodeType();
 }
Esempio n. 3
0
            public void ToStatusDate_Value_OK()
            {
                var inf = new PersonInformationType()
                {
                    StatusStartDate = DateTime.Today
                };
                var ret = inf.ToStatusDate();

                Assert.AreEqual(DateTime.Today, ret.Value);
            }
Esempio n. 4
0
            public void ToBirthDate_NoBirthdate_FromPnr()
            {
                var info = new PersonInformationType()
                {
                    PNR = DateTime.Today.ToString("ddMMyy4111")
                };
                var ret = info.ToBirthdate(true);

                Assert.AreEqual(DateTime.Today, ret);
            }
Esempio n. 5
0
            public void ToBirthdate_Value_OK()
            {
                var inf = new PersonInformationType()
                {
                    Birthdate = DateTime.Today
                };
                var ret = inf.ToBirthdate();

                Assert.AreEqual(DateTime.Today, ret);
            }
Esempio n. 6
0
            public void ToBirthdate_UncertainValue_Null(
                [Values('s', '2', '4', 'S')] char uncertainty)
            {
                var inf = new PersonInformationType()
                {
                    Birthdate = DateTime.Today, BirthdateUncertainty = uncertainty
                };
                var ret = inf.ToBirthdate();

                Assert.Null(ret);
            }
Esempio n. 7
0
            public void ToLivStatusType_Status_EmptyDate(
                [Values(1, 3, 5, 50, 60)] decimal status)
            {
                var inf = new PersonInformationType()
                {
                    Status = status
                };
                var res = inf.ToLivStatusType();

                Assert.Null(res.TilstandVirkning.FraTidspunkt.ToDateTime());
            }
Esempio n. 8
0
            public void ToLivStatusType_Status_HasVirkning(
                [Values(1, 3, 5, 50, 60)] decimal status)
            {
                var inf = new PersonInformationType()
                {
                    Status = status
                };
                var res = inf.ToLivStatusType();

                Assert.NotNull(res.TilstandVirkning);
            }
Esempio n. 9
0
            public void ToLivStatusType_StatusWithoutDate_Prenatal(
                [Values(1, 3, 5, 50, 60)] decimal status)
            {
                var inf = new PersonInformationType()
                {
                    Status = status
                };
                var res = inf.ToLivStatusType();

                Assert.AreEqual(LivStatusKodeType.Prenatal, res.LivStatusKode);
            }
Esempio n. 10
0
            public void ToLivStatusType_StatusWDate_Born(
                [Values(1, 3, 5, 50, 60)] decimal status)
            {
                var inf = new PersonInformationType()
                {
                    Status = status, Birthdate = DateTime.Today
                };
                var res = inf.ToLivStatusType();

                Assert.AreEqual(LivStatusKodeType.Foedt, res.LivStatusKode);
            }
Esempio n. 11
0
            public void PersonGenderCodeType_K_Female(
                [Values('K', 'k')] char gender)
            {
                var info = new PersonInformationType()
                {
                    Gender = gender
                };
                var ret = info.ToPersonGenderCodeType();

                Assert.AreEqual(PersonGenderCodeType.female, ret);
            }
Esempio n. 12
0
            public void ToPnr_Invalid_Emypty(
                [Values("12345678", "0", "224123", "12345", "123")] string pnr)
            {
                var inf = new PersonInformationType()
                {
                    PNR = pnr
                };
                var ret = inf.ToPnr();

                Assert.IsNullOrEmpty(ret);
            }
Esempio n. 13
0
            public void ToPnr_Normal_OK(
                [Values("1234567890", "123456789")] string pnr)
            {
                var inf = new PersonInformationType()
                {
                    PNR = pnr
                };
                var ret = inf.ToPnr();

                Assert.IsNotNullOrEmpty(ret);
            }