public void TestSentence1_If_Statement_Block_2_1()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence1Data(.5, .11, 0)
            };

            var sentence1 = builder.GetSentence1();
            Assert.AreEqual("The health of people in Derby is generally better than the England average.", sentence1);
        }
        public void TestSentence1_If_Statement_Block_1_Worng_Values_2()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence1Data(.2, .4, 5)
            };

            var sentence1 = builder.GetSentence1();
            Assert.AreNotEqual("The health of people in Derby is generally worse than the England average.", sentence1);
        }
        public void TestSentence3WorseWorse()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence3Data(Significance.Worse, Significance.Worse)
            };

            var sentence3 = builder.GetSentence3();
            Assert.AreEqual("Life expectancy for both men and women is lower than the England average.", sentence3);
        }
        public void TestSentence3NoneNone()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence3Data(Significance.None, Significance.None)
            };

            var sentence3 = builder.GetSentence3();
            Assert.AreEqual("", sentence3);
        }
        public void TestSentence3SameBetter()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence3Data(Significance.Same, Significance.Better)
            };

            var sentence3 = builder.GetSentence3();
            Assert.AreEqual("Life expectancy for women is higher than the England average.", sentence3);
        }
        public void TestSentence2_Deprivation_Mid()
        {
            var builder = new HealthProfilesKeyMessage1Builder
            {
                data = Sentence2Data(20)
            };

            var sentence2 = builder.GetSentence2();
            Assert.AreEqual("About 24% (3,300) of children live in low income families.", sentence2);
        }
        public void TestSentence2_Invalid_Data()
        {
            var builder = new HealthProfilesKeyMessage1Builder
            {
                data = Sentence2Data(-1)
            };

            var sentence2 = builder.GetSentence2();
            Assert.AreEqual("", sentence2);
        }
        public void TestSentence2_Deprivation_Low()
        {
            var builder = new HealthProfilesKeyMessage1Builder
            {
                data = Sentence2Data(1)
            };

            var sentence2 = builder.GetSentence2();
            Assert.AreEqual("AreaName is one of the 20% least deprived counties/unitary authorities in England, however about 24% (3,300) of children live in low income families.",
                sentence2);
        }
        public void TestSentence2DataIsNull()
        {
            var data = Sentence2Data(10);
            data.ChildrenInLowIncomeFamilies = null;

            var builder = new HealthProfilesKeyMessage1Builder
            {
                data = data
            };

            var sentence2 = builder.GetSentence2();
            Assert.AreEqual("", sentence2);
        }
        public void TestSentence2DataIsInvalid()
        {
            var data = Sentence2Data(10);
            data.ChildrenInLowIncomeFamilies = new CoreDataSet { Value = ValueData.NullValue };

            var builder = new HealthProfilesKeyMessage1Builder
            {
                data = data
            };

            var sentence2 = builder.GetSentence2();
            Assert.AreEqual("", sentence2);
        }
        public void TestSentence1_If_Statement_Block_4()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence1Data(0, 0, 0)
            };

            var sentence1 = builder.GetSentence1();
            Assert.AreEqual("The health of people in Derby is varied compared with the England average.", sentence1);
        }
        public void TestSentence1_If_Statement_Block_3()
        {
            var builder = new HealthProfilesKeyMessage1Builder()
            {
                data = Sentence1Data(0, 0, 1)
            };

            var sentence1 = builder.GetSentence1();
            Assert.AreEqual("The health of people in Derby is generally similar to the England average.", sentence1);
        }