Merge pull request #6817 from alimate/BAEL-2915
Bael 2915: Null and Empty Sources for JUnit 5
This commit is contained in:
commit
b8414a1e97
@ -103,13 +103,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.platform</groupId>
|
|
||||||
<artifactId>junit-platform-surefire-provider</artifactId>
|
|
||||||
<version>${junit.platform.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
@ -130,10 +123,10 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<junit.jupiter.version>5.3.1</junit.jupiter.version>
|
<junit.jupiter.version>5.4.2</junit.jupiter.version>
|
||||||
<mockito.junit.jupiter.version>2.23.0</mockito.junit.jupiter.version>
|
<mockito.junit.jupiter.version>2.23.0</mockito.junit.jupiter.version>
|
||||||
<junit.platform.version>1.2.0</junit.platform.version>
|
<junit.platform.version>1.4.2</junit.platform.version>
|
||||||
<junit.vintage.version>5.2.0</junit.vintage.version>
|
<junit.vintage.version>5.4.2</junit.vintage.version>
|
||||||
<log4j2.version>2.8.2</log4j2.version>
|
<log4j2.version>2.8.2</log4j2.version>
|
||||||
<h2.version>1.4.196</h2.version>
|
<h2.version>1.4.196</h2.version>
|
||||||
<powermock.version>2.0.0-RC.1</powermock.version>
|
<powermock.version>2.0.0-RC.1</powermock.version>
|
||||||
|
@ -86,7 +86,30 @@ class StringsUnitTest {
|
|||||||
assertEquals(expected, actualValue);
|
assertEquals(expected, actualValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@NullSource
|
||||||
|
void isBlank_ShouldReturnTrueForNullInputs(String input) {
|
||||||
|
assertTrue(Strings.isBlank(input));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@EmptySource
|
||||||
|
void isBlank_ShouldReturnTrueForEmptyStrings(String input) {
|
||||||
|
assertTrue(Strings.isBlank(input));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@NullAndEmptySource
|
||||||
|
void isBlank_ShouldReturnTrueForNullAndEmptyStrings(String input) {
|
||||||
|
assertTrue(Strings.isBlank(input));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@NullAndEmptySource
|
||||||
|
@ValueSource(strings = {" ", "\t", "\n"})
|
||||||
|
void isBlank_ShouldReturnTrueForAllTypesOfBlankStrings(String input) {
|
||||||
|
assertTrue(Strings.isBlank(input));
|
||||||
|
}
|
||||||
|
|
||||||
private static Stream<Arguments> provideStringsForIsBlank() {
|
private static Stream<Arguments> provideStringsForIsBlank() {
|
||||||
return Stream.of(
|
return Stream.of(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user