private static IEnumerable <HtmlDataModel> GetInvolvedDataModels( [NotNull] IEnumerable <HtmlQualitySpecificationElement> htmlElements) { var models = new Dictionary <DdxModel, HtmlDataModel>(); foreach (HtmlQualitySpecificationElement element in htmlElements) { foreach (HtmlTestParameterValue parameterValue in element.QualityCondition.ParameterValues) { if (!parameterValue.IsDatasetParameter) { continue; } Dataset dataset = Assert.NotNull(parameterValue.DatasetValue); DdxModel model = dataset.Model; HtmlDataModel htmlDataModel; if (!models.TryGetValue(model, out htmlDataModel)) { htmlDataModel = new HtmlDataModel(model); models.Add(model, htmlDataModel); } HtmlDataset htmlDataset = htmlDataModel.GetHtmlDataset(dataset); htmlDataset.AddReference(new HtmlDatasetReference(element, parameterValue)); } } return(models.Values.OrderBy(m => m.Name)); }
internal HtmlDataset GetHtmlDataset([NotNull] Dataset dataset) { Assert.ArgumentNotNull(dataset, nameof(dataset)); HtmlDataset result; if (!_datasets.TryGetValue(dataset, out result)) { result = new HtmlDataset(dataset); _datasets.Add(dataset, result); _sortedDatasets = null; } return(result); }
internal HtmlTestParameterValue([NotNull] TestParameterValue testParameterValue, [NotNull] HtmlTestParameter testParameter) { Name = testParameterValue.TestParameterName; Value = testParameterValue.StringValue; TestParameter = testParameter; var datasetParameterValue = testParameterValue as DatasetTestParameterValue; if (datasetParameterValue != null) { Dataset dataset = Assert.NotNull(datasetParameterValue.DatasetValue); DatasetValue = dataset; Dataset = dataset.Name; IsDatasetParameter = true; FilterExpression = datasetParameterValue.FilterExpression; DataModel = dataset.Model.Name; UsedAsReferenceData = datasetParameterValue.UsedAsReferenceData; DatasetGeometryType = HtmlDataset.GetGeometryTypeName(dataset); } }