示例#1
0
        public void LongLinesAreNotConcatenated()
        {
            // Arrange
            var initialOrganisation = new Organisation {
                OrganisationName      = "Softwire",
                OrganisationAddresses = new[] {
                    new OrganisationAddress {
                        PoBox    = "",
                        Address1 = "Unit 110",
                        Address2 = "53-79 Highgate Road",
                        Address3 = "Kentish Town",
                        TownCity = "London",
                        County   =
                            "Municipality of Greater London", // TownCity + County > 35 characters, so should not be concatenated
                        Country = ""
                    }
                }
            };

            // Act
            List <string> outputAddress = PinInThePostService.GetAddressInFourLineFormat(initialOrganisation);

            // Assert
            AssertListEqual(
                outputAddress,
                new List <string> {
                "Unit 110", "53-79 Highgate Road", "Kentish Town, London", "Municipality of Greater London"
            });
        }
示例#2
0
        public void FourLineAddressIsNotShortened()
        {
            // Arrange
            var initialOrganisation = new Organisation {
                OrganisationName      = "Softwire",
                OrganisationAddresses = new[] {
                    new OrganisationAddress {
                        PoBox    = "",
                        Address1 = "Unit 110",
                        Address2 = "53-79 Highgate Road",
                        Address3 = "Kentish Town",
                        TownCity = "London",
                        County   = "",
                        Country  = ""
                    }
                }
            };

            // Act
            List <string> outputAddress = PinInThePostService.GetAddressInFourLineFormat(initialOrganisation);

            // Assert
            AssertListEqual(outputAddress, new List <string> {
                "Unit 110", "53-79 Highgate Road", "Kentish Town", "London"
            });
        }