|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2012-2023 the original author or authors. |
|
|
|
|
* Copyright 2012-2024 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -45,7 +45,8 @@ class InvalidConfigurationPropertyValueFailureAnalyzerTests {
@@ -45,7 +45,8 @@ class InvalidConfigurationPropertyValueFailureAnalyzerTests {
|
|
|
|
|
InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException( |
|
|
|
|
"test.property", "invalid", "This is not valid."); |
|
|
|
|
FailureAnalysis analysis = new InvalidConfigurationPropertyValueFailureAnalyzer(null).analyze(failure); |
|
|
|
|
assertThat(analysis).isNull(); |
|
|
|
|
assertThat(analysis.getDescription()) |
|
|
|
|
.contains("Invalid value 'invalid' for configuration property 'test.property'."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@ -98,7 +99,9 @@ class InvalidConfigurationPropertyValueFailureAnalyzerTests {
@@ -98,7 +99,9 @@ class InvalidConfigurationPropertyValueFailureAnalyzerTests {
|
|
|
|
|
void analysisWithUnknownKey() { |
|
|
|
|
InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException( |
|
|
|
|
"test.key.not.defined", "invalid", "This is not valid."); |
|
|
|
|
assertThat(performAnalysis(failure)).isNull(); |
|
|
|
|
FailureAnalysis analysis = performAnalysis(failure); |
|
|
|
|
assertThat(analysis.getDescription()) |
|
|
|
|
.contains("Invalid value 'invalid' for configuration property 'test.key.not.defined'."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void assertCommonParts(InvalidConfigurationPropertyValueException failure, FailureAnalysis analysis) { |
|
|
|
|
|