Commit 3f1aaa1f authored by Stephane Nicoll's avatar Stephane Nicoll

Polish contribution

Closes gh-11783
parent 64c32461
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
...@@ -58,6 +58,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests { ...@@ -58,6 +58,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests {
"test.property", "invalid", "This is not valid."); "test.property", "invalid", "This is not valid.");
FailureAnalysis analysis = performAnalysis(failure); FailureAnalysis analysis = performAnalysis(failure);
assertCommonParts(failure, analysis); assertCommonParts(failure, analysis);
assertThat(analysis.getAction())
.contains("Review the value of the property with the provided reason.");
assertThat(analysis.getDescription()) assertThat(analysis.getDescription())
.contains("Validation failed for the following reason") .contains("Validation failed for the following reason")
.contains("This is not valid.") .contains("This is not valid.")
...@@ -73,7 +75,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests { ...@@ -73,7 +75,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests {
InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException( InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException(
"test.property", "invalid", null); "test.property", "invalid", null);
FailureAnalysis analysis = performAnalysis(failure); FailureAnalysis analysis = performAnalysis(failure);
assertCommonParts(failure, analysis); assertThat(analysis.getAction())
.contains("Review the value of the property.");
assertThat(analysis.getDescription()).contains("No reason was provided.") assertThat(analysis.getDescription()).contains("No reason was provided.")
.doesNotContain("Additionally, this property is also set"); .doesNotContain("Additionally, this property is also set");
} }
...@@ -95,6 +98,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests { ...@@ -95,6 +98,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests {
"test.property", "invalid", "This is not valid."); "test.property", "invalid", "This is not valid.");
FailureAnalysis analysis = performAnalysis(failure); FailureAnalysis analysis = performAnalysis(failure);
assertCommonParts(failure, analysis); assertCommonParts(failure, analysis);
assertThat(analysis.getAction())
.contains("Review the value of the property with the provided reason.");
assertThat(analysis.getDescription()) assertThat(analysis.getDescription())
.contains("Additionally, this property is also set in the following " .contains("Additionally, this property is also set in the following "
+ "property sources:") + "property sources:")
...@@ -113,8 +118,6 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests { ...@@ -113,8 +118,6 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests {
FailureAnalysis analysis) { FailureAnalysis analysis) {
assertThat(analysis.getDescription()).contains("test.property") assertThat(analysis.getDescription()).contains("test.property")
.contains("invalid").contains("TestOrigin test.property"); .contains("invalid").contains("TestOrigin test.property");
assertThat(analysis.getAction())
.contains("Review the value of the property with the provided reason.");
assertThat(analysis.getCause()).isSameAs(failure); assertThat(analysis.getCause()).isSameAs(failure);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment