2 writes to FailureMessage
Microsoft.Extensions.Options (2)
ValidateOptionsResult.cs (2)
64
=> new ValidateOptionsResult { Failed = true,
FailureMessage
= failureMessage, Failures = new string[] { failureMessage } };
72
=> new ValidateOptionsResult { Failed = true,
FailureMessage
= string.Join("; ", failures), Failures = failures };
39 references to FailureMessage
Aspire.Dashboard.Tests (18)
DashboardOptionsTests.cs (18)
35
Assert.Null(result.
FailureMessage
);
50
Assert.Equal("One or more frontend endpoint URLs are not configured. Specify an ASPNETCORE_URLS value.", result.
FailureMessage
);
62
Assert.Equal("Failed to parse frontend endpoint URLs 'invalid'.", result.
FailureMessage
);
74
Assert.Equal("Failed to parse frontend endpoint URLs 'http://localhost:5000;invalid'.", result.
FailureMessage
);
88
Assert.Equal($"{DashboardConfigNames.DashboardFrontendMaxConsoleLogCountName.ConfigKey} must be greater than zero.", result.
FailureMessage
);
104
Assert.Equal("Failed to parse resource service client endpoint URL 'invalid'.", result.
FailureMessage
);
118
Assert.Equal($"{DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey} is \"{nameof(ResourceClientAuthMode.ApiKey)}\", but no {DashboardConfigNames.ResourceServiceClientApiKeyName.ConfigKey} is configured.", result.
FailureMessage
);
133
Assert.Equal($"{DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey} is \"File\", but no {DashboardConfigNames.ResourceServiceClientCertificateFilePathName.ConfigKey} is configured.", result.
FailureMessage
);
148
Assert.Equal($"{DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey} is \"KeyStore\", but no {DashboardConfigNames.ResourceServiceClientCertificateSubjectName.ConfigKey} is configured.", result.
FailureMessage
);
162
Assert.Equal($"The resource service client is configured to use certificates, but no certificate source is specified. Specify {DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey}. Possible values: {string.Join(", ", typeof(DashboardClientCertificateSource).GetEnumNames())}", result.
FailureMessage
);
176
Assert.Equal($"Unexpected resource service client certificate source: {options.ResourceServiceClient.ClientCertificate.Source}", result.
FailureMessage
);
189
Assert.Equal($"Resource service client authentication is not configured. Specify {DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey}. Possible values: {string.Join(", ", typeof(ResourceClientAuthMode).GetEnumNames())}", result.
FailureMessage
);
202
Assert.Equal($"Unexpected resource service client authentication mode: {int.MaxValue}", result.
FailureMessage
);
221
result.
FailureMessage
);
233
Assert.Equal("Failed to parse OTLP gRPC endpoint URL 'invalid'.", result.
FailureMessage
);
245
Assert.Equal("Failed to parse OTLP HTTP endpoint URL 'invalid'.", result.
FailureMessage
);
262
Assert.Equal("OpenID Connect claim type for name not configured. Specify a Dashboard:Frontend:OpenIdConnect:NameClaimType value.", result.
FailureMessage
);
275
Assert.Equal("OpenID Connect claim type for username not configured. Specify a Dashboard:Frontend:OpenIdConnect:UsernameClaimType value.", result.
FailureMessage
);
Aspire.Hosting.Tests (16)
Dashboard\TransportOptionsValidatorTests.cs (16)
28
result.
FailureMessage
45
Assert.True(result.Succeeded, result.
FailureMessage
);
63
Assert.True(result.Succeeded, result.
FailureMessage
);
81
Assert.True(result.Succeeded, result.
FailureMessage
);
101
result.
FailureMessage
120
result.
FailureMessage
140
result.
FailureMessage
162
result.
FailureMessage
184
result.
FailureMessage
207
result.
FailureMessage
232
result.
FailureMessage
256
result.
FailureMessage
278
result.
FailureMessage
295
Assert.True(result.Succeeded, result.
FailureMessage
);
311
Assert.True(result.Succeeded, result.
FailureMessage
);
329
Assert.True(result.Succeeded, result.
FailureMessage
);
Microsoft.Extensions.Compliance.Testing.Tests (3)
FakeRedactorOptionsValidatorTests.cs (3)
23
Assert.Contains(nameof(FakeRedactorOptions.RedactionFormat), validationResult.
FailureMessage
);
42
Assert.True(validationResult.Failed, validationResult.
FailureMessage
);
43
Assert.Contains(nameof(options.RedactionFormat), validationResult.
FailureMessage
);
Microsoft.Extensions.Options (2)
ValidateOptionsResult.cs (1)
45
[MemberNotNullWhen(true, nameof(
FailureMessage
))]
ValidateOptionsResultBuilder.cs (1)
80
Errors.Add(result.
FailureMessage
);