public void TestSentence2_EmptyStringWhenNoData() { var builder = new HealthProfilesKeyMessage4Builder { data = new KeyMessageData() }; Assert.AreEqual("", builder.GetSentence2()); }
public void TestSentence2_Sig_Worse() { var builder = new HealthProfilesKeyMessage4Builder { data = new KeyMessageData { AdultAlcoholAdmissions = 17.5, AdultAlcoholAdmissionsPerYear = 30456, AdultAlcoholAdmissionsSignificance = Significance.Worse, } }; var sentence = builder.GetSentence2(); Assert.AreEqual("The rate of alcohol-related harm hospital stays is 18*, worse than the average for England. This represents 30,456 stays per year.", sentence); }
public void TestSentence2_Wrong_Data() { var builder = new HealthProfilesKeyMessage4Builder { data = new KeyMessageData { AdultAlcoholAdmissions = 17.5, AdultAlcoholAdmissionsPerYear = 10456, AdultAlcoholAdmissionsSignificance = Significance.Better, } }; var sentence = builder.GetSentence2(); Assert.AreNotEqual("The rate of alcohol related harm hospital stays is 18*. This represents 30,456 stays per year.", sentence); }