Пример #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"
            });
        }
 public RegistrationRepository(
     IDataRepository dataRepository,
     AuditLogger auditLogger,
     PinInThePostService pinInThePostService,
     EmailSendingService emailSendingService)
 {
     this.dataRepository      = dataRepository;
     this.auditLogger         = auditLogger;
     this.pinInThePostService = pinInThePostService;
     this.emailSendingService = emailSendingService;
 }