public void TestSentence1_Significance_Same()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    ObesityYear6Percentage = "19.2",
                    ObesityYear6Count = "12,999",
                    ObesityYear6Significance = Significance.Same
                }
            };

            var sentence = builder.GetSentence1();
            Assert.AreEqual("In Year 6, 19.2% (12,999) of children are classified as obese.", sentence);
        }
        public void TestSentence1_Wrong_Data()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    ObesityYear6Percentage = "30.2",
                    ObesityYear6Count = "12,000",
                    ObesityYear6Significance = Significance.Worse
                }
            };

            var sentence = builder.GetSentence1();
            Assert.AreNotEqual(
                "In Year 6, 19.2% (12,999) of children are classified as obese, worse than the average for England.",
                sentence);
        }
        public void TestSentence4_TeenagePregnancySig_Worse()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    TeenagePregnancySig = Significance.Worse,
                    GcseAchievementSig = Significance.Better,
                    BreastfeedingInitiationSig = Significance.Better,
                    SmokingAtTimeOfDeliverySig = Significance.Better
                }
            };

            var sentence = builder.GetSentence4();
            Assert.AreEqual("Levels of GCSE attainment, breastfeeding initiation and smoking at time of delivery are better than the England average.", sentence);
        }
        public void TestSentence4_All_Worse()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    TeenagePregnancySig = Significance.Worse,
                    GcseAchievementSig = Significance.Worse,
                    BreastfeedingInitiationSig = Significance.Worse,
                    SmokingAtTimeOfDeliverySig = Significance.Worse
                }
            };

            var sentence = builder.GetSentence4();
            Assert.AreEqual(string.Empty, sentence);
        }
        public void TestSentence2_Wrong_Data()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    Under18AlcoholSpecificHospitalStays = 89.0,
                    Under18AlcoholSpecificSignificance = Significance.Same,
                    Under18AlcoholSpecificHospitalStaysPerYear = "50,101"
                }
            };

            var sentence = builder.GetSentence2();
            Assert.AreNotEqual(
                "The rate of alcohol-specific hospital stays among those under 18 was 20.0*. This represents 10,001 stays per year.",
                sentence);
        }
        public void TestSentence2_Significance_Worse()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    Under18AlcoholSpecificHospitalStays = 20.0,
                    Under18AlcoholSpecificSignificance = Significance.Worse,
                    Under18AlcoholSpecificHospitalStaysPerYear = "10,001"
                }
            };

            var sentence = builder.GetSentence2();
            Assert.AreEqual(
                "The rate of alcohol-specific hospital stays among those under 18 was 20.0*, worse than the average for England. This represents 10,001 stays per year.",
                sentence);
        }
        public void TestSentence2_NullValue()
        {
            var builder = new HealthProfilesKeyMessage3Builder
            {
                data = new KeyMessageData
                {
                    Under18AlcoholSpecificHospitalStays = null,
                    Under18AlcoholSpecificSignificance = Significance.None,
                    Under18AlcoholSpecificHospitalStaysPerYear = null
                }
            };

            var sentence = builder.GetSentence2();
            Assert.AreEqual(string.Empty, sentence);
        }