22 instantiations of BooleanMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (15)
ResultsTests.cs (15)
158var metricA = new BooleanMetric("Metric with value false", false);
159var metricB = new BooleanMetric("Metric with value true", true);
160var metricC = new BooleanMetric("Metric without value");
161var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason");
186var metricA = new BooleanMetric("Metric with value false", false);
187var metricB = new BooleanMetric("Metric with value true", true);
188var metricC = new BooleanMetric("Metric without value");
189var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason");
420var metric1 = new BooleanMetric("Metric with all diagnostic severities");
428var metric2 = new BooleanMetric("Metric with warning and informational diagnostics");
473var metric1 = new BooleanMetric("Metric with all diagnostic severities");
481var metric2 = new BooleanMetric("Metric with warning and informational diagnostics");
532var metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true);
540var metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true);
591var metric = new BooleanMetric("Condition", true);
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
Microsoft.Extensions.AI.Evaluation.Safety (2)
Microsoft.Extensions.AI.Evaluation.Tests (1)
77 references to BooleanMetric
Microsoft.Extensions.AI.Evaluation (4)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (47)
ResultsTests.cs (17)
45case BooleanMetric booleanMetric:
108(m is BooleanMetric b && b.Value is not null) ||
158var metricA = new BooleanMetric("Metric with value false", false);
159var metricB = new BooleanMetric("Metric with value true", true);
160var metricC = new BooleanMetric("Metric without value");
161var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason");
186var metricA = new BooleanMetric("Metric with value false", false);
187var metricB = new BooleanMetric("Metric with value true", true);
188var metricC = new BooleanMetric("Metric without value");
189var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason");
420var metric1 = new BooleanMetric("Metric with all diagnostic severities");
428var metric2 = new BooleanMetric("Metric with warning and informational diagnostics");
473var metric1 = new BooleanMetric("Metric with all diagnostic severities");
481var metric2 = new BooleanMetric("Metric with warning and informational diagnostics");
532var metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true);
540var metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true);
591var metric = new BooleanMetric("Condition", true);
SafetyEvaluatorTests.cs (28)
219Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _));
221Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes));
222Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _));
310Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _));
312Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes));
313Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _));
355Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _));
356Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _));
357Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _));
358Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _));
359Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _));
391Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _));
392Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _));
393Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _));
394Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _));
395Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _));
440Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _));
441Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _));
442Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _));
443Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _));
444Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _));
502Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _));
503Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _));
504Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _));
505Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _));
506Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _));
535Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _));
576Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _));
Microsoft.Extensions.AI.Evaluation.Quality (5)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
Microsoft.Extensions.AI.Evaluation.Safety (13)
Microsoft.Extensions.AI.Evaluation.Tests (1)