|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2023 the original author or authors. |
| 2 | + * Copyright 2012-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -45,7 +45,8 @@ void analysisWithNullEnvironment() {
|
45 | 45 | InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException(
|
46 | 46 | "test.property", "invalid", "This is not valid.");
|
47 | 47 | FailureAnalysis analysis = new InvalidConfigurationPropertyValueFailureAnalyzer(null).analyze(failure);
|
48 |
| - assertThat(analysis).isNull(); |
| 48 | + assertThat(analysis.getDescription()) |
| 49 | + .contains("Invalid value 'invalid' for configuration property 'test.property'."); |
49 | 50 | }
|
50 | 51 |
|
51 | 52 | @Test
|
@@ -98,7 +99,9 @@ void analysisWithKnownPropertyAndOtherCandidates() {
|
98 | 99 | void analysisWithUnknownKey() {
|
99 | 100 | InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException(
|
100 | 101 | "test.key.not.defined", "invalid", "This is not valid.");
|
101 |
| - assertThat(performAnalysis(failure)).isNull(); |
| 102 | + FailureAnalysis analysis = performAnalysis(failure); |
| 103 | + assertThat(analysis.getDescription()) |
| 104 | + .contains("Invalid value 'invalid' for configuration property 'test.key.not.defined'."); |
102 | 105 | }
|
103 | 106 |
|
104 | 107 | private void assertCommonParts(InvalidConfigurationPropertyValueException failure, FailureAnalysis analysis) {
|
|
0 commit comments