private static void Contains(EthnicityLabelBuilder builder, string expected) { Assert.IsTrue(builder.Label.Contains(expected)); }
private void SetEthnicityText() { const int categoryTypeId = EthnicityLabelBuilder.EthnicityCategoryTypeId; Grouping grouping = groupDataReader.GetGroupingsByGroupIdAndIndicatorId(GroupId, IndicatorIds.EthnicityEstimates); if (grouping == null) { throw new FingertipsException("Ethnicity estimates not found in practice profiles supporting indicators domain"); } var dataList = groupDataReader.GetCoreDataListForAllCategoryAreasOfCategoryAreaType( grouping, TimePeriod.GetDataPoint(grouping), categoryTypeId, AreaCode); if (dataList.Any()) { var categories = areasReader.GetCategories(categoryTypeId); EthnicityLabelBuilder builder = new EthnicityLabelBuilder(dataList, categories); if (builder.IsLabelRequired) { EthnicityText = builder.Label; } } }