Use consistent exception messages in Assert calls
See gh-44044 Signed-off-by: Johnny Lim <izeye@naver.com>
This commit is contained in:
committed by
Moritz Halbritter
parent
c8afa398f1
commit
c9320de559
@@ -182,7 +182,7 @@ abstract class AbstractPackagerTests<P extends Packager> {
|
||||
this.testJarFile.addClass("a/b/C.class", ClassWithMainMethod.class);
|
||||
P packager = createPackager();
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> execute(packager, null))
|
||||
.withMessageContaining("Libraries must not be null");
|
||||
.withMessageContaining("'libraries' must not be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -31,12 +31,12 @@ class LayerTests {
|
||||
|
||||
@Test
|
||||
void createWhenNameIsNullThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new Layer(null)).withMessage("Name must not be empty");
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new Layer(null)).withMessage("'name' must not be empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWhenNameIsEmptyThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new Layer("")).withMessage("Name must not be empty");
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new Layer("")).withMessage("'name' must not be empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -33,13 +33,13 @@ class ApplicationContentFilterTests {
|
||||
@Test
|
||||
void createWhenPatternIsNullThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new ApplicationContentFilter(null))
|
||||
.withMessage("Pattern must not be empty");
|
||||
.withMessage("'pattern' must not be empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWhenPatternIsEmptyThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new ApplicationContentFilter(""))
|
||||
.withMessage("Pattern must not be empty");
|
||||
.withMessage("'pattern' must not be empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -42,14 +42,14 @@ class IncludeExcludeContentSelectorTests {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(
|
||||
() -> new IncludeExcludeContentSelector<>(null, Collections.emptyList(), Collections.emptyList()))
|
||||
.withMessage("Layer must not be null");
|
||||
.withMessage("'layer' must not be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWhenFactoryIsNullThrowsException() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new IncludeExcludeContentSelector<>(LAYER, null, null, null))
|
||||
.withMessage("FilterFactory must not be null");
|
||||
.withMessage("'filterFactory' must not be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -38,13 +38,13 @@ class LibraryContentFilterTests {
|
||||
@Test
|
||||
void createWhenCoordinatesPatternIsNullThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new LibraryContentFilter(null))
|
||||
.withMessage("CoordinatesPattern must not be empty");
|
||||
.withMessage("'coordinatesPattern' must not be empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWhenCoordinatesPatternIsEmptyThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new LibraryContentFilter(""))
|
||||
.withMessage("CoordinatesPattern must not be empty");
|
||||
.withMessage("'coordinatesPattern' must not be empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user