public void TestGetPartitionTrendData() { var indicatorId = IndicatorIds.LifeExpectancyAtBirth; var trendData = new PartitionDataForAllAgesBuilder().GetPartitionTrendData(ProfileIds.Phof, AreaCodes.England, indicatorId, SexIds.Male, AreaTypeIds.CountyAndUnitaryAuthority); Assert.IsNotNull(trendData.Limits); Assert.IsTrue(trendData.Labels.Select(x => x.Name).Contains("All ages")); Assert.IsTrue(trendData.Labels.Count < 10, "Ages should be limited to those with data"); Assert.IsTrue(trendData.Periods.Count > 0); Assert.IsTrue(trendData.TrendData[AgeIds.AllAges].Count > 0, "Expected trend data"); }
public void TestGetPartitionData() { var indicatorId = IndicatorIds.LifeExpectancyAtBirth; var data = new PartitionDataForAllAgesBuilder().GetPartitionData(ProfileIds.Phof, AreaCodes.England, indicatorId, SexIds.Male, AreaTypeIds.CountyAndUnitaryAuthority); Assert.AreEqual(AreaCodes.England, data.AreaCode); Assert.AreEqual(SexIds.Male, data.SexId); Assert.AreEqual(indicatorId, data.IndicatorId); Assert.IsTrue(data.Ages.Any(), "No ages"); CheckData(data); }