Beispiel #1
0
        public override string ToString()
        {
            var sb     = new StringBuilder();
            var number = FlatNumber.HasValue ? $"{HouseNumber}/{FlatNumber.Value}" : HouseNumber.ToString();

            sb.AppendLine($"{Street} {number}");
            sb.AppendLine($"{PostCode}, {City}");

            return(sb.ToString());
        }
Beispiel #2
0
        public void ToString_CustomFormatter_SupportsCustomFormatting()
        {
            var act = TestStruct.ToString("Unit Test Format", new UnitTestFormatProvider());
            var exp = "Unit Test Formatter, value: '123456789', format: 'Unit Test Format'";

            Assert.AreEqual(exp, act);
        }
Beispiel #3
0
        public void FromJson_StringValue_AreEqual()
        {
            var act = JsonTester.Read <HouseNumber>(TestStruct.ToString(CultureInfo.InvariantCulture));
            var exp = TestStruct;

            Assert.AreEqual(exp, act);
        }
        //public int NameCode { get; set; }

        public InsuredPersonRecord()
        {
            // Set default values.
            //NameCode = 1;
            AddressCountryCode = "00";
            Postcode           = string.Empty;
            RelationId         = string.Empty;

            // Declare fields.
            MapField(2, 12, "Identificatie detailrecord").Numeric().Getter(x => Id.ToString());
            MapField(14, 9, "Burgerservicenummer").Numeric().Getter(x => BurgerServiceNumber.ToString());
            MapField(23, 4, "UZOVI-nummer").Numeric().Getter(x => UzoviId.ToString());
            MapField(27, 15, "Verzekerdennummer").Alphanumeric().Getter(x => RelationId);

            MapField(53, 8, "Datum geboort verzekerde").Numeric().Getter(x => DateOfBirth.ToString("yyyyMMdd"));
            MapField(61, 1, "Geslacht verzekerde").Numeric().Getter(x =>
            {
                if (Gender == EI.Gender.Male)
                {
                    return("1");
                }
                else
                {
                    return("2");
                }
            });
            MapField(62, 1, "Naamcode/naamgebruik (01)").Numeric().Getter(x => "1");
            MapField(63, 25, "Naam verzekerde").Alphanumeric().Getter(x => SurName).SetTrim(EIFieldTrim.End);
            MapField(88, 10, "Voorvoegsel verzekerde").Alphanumeric().Getter(x => SurnamePrefix).SetTrim(EIFieldTrim.End);

            //  Second name of insured person only for use by service companies.
            MapField(98, 1, "Naamcode/naamgebruik (02)").Numeric().Getter(x => "0");

            MapField(134, 6, "Voorletters verzekerde").Alphanumeric().Getter(x => Initials).SetTrim(EIFieldTrim.End);

            MapField(140, 1, "Naamcode/naamgebruik (03)").Numeric().Getter(x => "1");

            MapField(141, 6, "Postcode (huisadres) verzekerde").Alphanumeric().Getter(x => {
                if (AddressCountryCode == "00" || AddressCountryCode == "NL")
                {
                    return(Postcode);
                }
                else
                {
                    return(string.Empty);
                }
            });
            MapField(147, 9, "Postcode buitenland").Alphanumeric().Getter(x =>
            {
                if (AddressCountryCode == "00" || AddressCountryCode == "NL")
                {
                    return(string.Empty);
                }
                else
                {
                    return(Postcode);
                }
            });
            MapField(167, 2, "Code land verzekerde").Alphanumeric().Getter(x => AddressCountryCode);

            MapField(156, 5, "Huisnummer verzekerde").Numeric().Getter(x => HouseNumber.ToString());
            MapField(180, 1, "Indicatie client overleden").Numeric().Getter(x => {
                if (Deceased)
                {
                    return("1");
                }
                else
                {
                    return("2");
                }
            });
        }
 public override string ToString()
 {
     return(Street + " " + HouseNumber.ToString() + ", " + City);
 }
Beispiel #6
0
 public override string ToString()
 {
     return(HouseNumber.ToString(CultureInfo.CurrentCulture) + " " + StreetName);
 }
Beispiel #7
0
 // Overloaded to string, do with this as you want to.
 public override string ToString()
 {
     return("AddressLine1:{" + AddressLine1 + "} \nAddressLine2:{" + AddressLine2 + "} \nCity:{" + City + "{\n" +
            "Province:{" + StateProvince + "} \nHouseNumber:{" + HouseNumber.ToString() + "} \nStreetName:{" + StreetName + "} " +
            "\nAddressSuffix:" + AddressSuffix + "}");
 }