private void WriteMessageToFile(IList<string> areaCodes)
        {
            foreach (string areaCode in areaCodes)
            {
                if (areaCode == AreaCodes.CountyUa_IslesOfScilly || areaCode == AreaCodes.CountyUa_CityOfLondon)
                {
                    // do nothing
                }
                else
                {
                    HealthProfilesSupportingInformation data =
                        new HealthProfilesSupportingInformationBuilder(areaCode).Build();

                    var sb = new StringBuilder();
                    sb.Append(areaCode);
                    sb.Append("\t");
                    sb.Append(data.HealthProfilesData.Population);
                    sb.Append("\t");
                    sb.Append(data.HealthProfilesContent.AreaType);

                    IList<string> messages = data.HealthProfilesContent.KeyMessages;
                    foreach (string message in messages)
                    {
                        sb.Append("\t");
                        sb.Append(message);
                    }

                    WriteLineToFile(sb.ToString());
                }
            }
        }
        public void TestLifeExpectancyValuesFormattedCorrectlyForLowerTierLAs()
        {
            var data = new HealthProfilesSupportingInformationBuilder(AreaCodes.La_Wychavon).Build();
            var keyMessage2 = data.HealthProfilesContent.KeyMessages[1];
            var regex = new Regex(@"\d{3}");

            Assert.IsFalse(string.IsNullOrEmpty(keyMessage2), "Key message not defined");
            Assert.IsFalse(regex.IsMatch(keyMessage2), keyMessage2);
        }