mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-18 23:58:14 +08:00
add file configuration fluent validation and change default configura… (#168)
* add file configuration fluent validation and change default configuration validator to fluent validator * add file validation failed error code * change authentication schemes check to async * beautify the code ^_^ * clean file validation and fix test failure.
This commit is contained in:
@ -54,6 +54,7 @@ namespace Ocelot.UnitTests.Responder
|
||||
[InlineData(OcelotErrorCode.DownstreampathTemplateAlreadyUsedError)]
|
||||
[InlineData(OcelotErrorCode.DownstreamPathTemplateContainsSchemeError)]
|
||||
[InlineData(OcelotErrorCode.DownstreamSchemeNullOrEmptyError)]
|
||||
[InlineData(OcelotErrorCode.FileValidationFailedError)]
|
||||
[InlineData(OcelotErrorCode.InstructionNotForClaimsError)]
|
||||
[InlineData(OcelotErrorCode.NoInstructionsError)]
|
||||
[InlineData(OcelotErrorCode.ParsingConfigurationHeaderError)]
|
||||
@ -120,7 +121,7 @@ namespace Ocelot.UnitTests.Responder
|
||||
// If this test fails then it's because the number of error codes has changed.
|
||||
// You should make the appropriate changes to the test cases here to ensure
|
||||
// they cover all the error codes, and then modify this assertion.
|
||||
Enum.GetNames(typeof(OcelotErrorCode)).Length.ShouldBe(31, "Looks like the number of error codes has changed. Do you need to modify ErrorsToHttpStatusCodeMapper?");
|
||||
Enum.GetNames(typeof(OcelotErrorCode)).Length.ShouldBe(32, "Looks like the number of error codes has changed. Do you need to modify ErrorsToHttpStatusCodeMapper?");
|
||||
}
|
||||
|
||||
private void ShouldMapErrorToStatusCode(OcelotErrorCode errorCode, HttpStatusCode expectedHttpStatusCode)
|
||||
|
Reference in New Issue
Block a user