Replace assertThat(x.contains(y)).isTrue() with assertThat(x).contains(y)

Search for   : assertThat\((.+)\.contains\((.+)\)\)\.isTrue\(\)
Replace with : assertThat($1).contains($2)

Search for   : assertThat\((.+)\.contains\((.+)\)\)\.isFalse\(\)
Replace with : assertThat($1).doesNotContain($2)

Closes gh-31762
This commit is contained in:
Yanming Zhou
2023-12-06 12:45:06 +08:00
committed by Brian Clozel
parent 1a63257b12
commit e2852e7355
39 changed files with 234 additions and 234 deletions

View File

@@ -89,8 +89,8 @@ class MockMultipartHttpServletRequestTests {
fileNames.add(fileIter.next());
}
assertThat(fileNames).hasSize(2);
assertThat(fileNames.contains("file1")).isTrue();
assertThat(fileNames.contains("file2")).isTrue();
assertThat(fileNames).contains("file1");
assertThat(fileNames).contains("file2");
MultipartFile file1 = request.getFile("file1");
MultipartFile file2 = request.getFile("file2");
Map<String, MultipartFile> fileMap = request.getFileMap();

View File

@@ -55,14 +55,14 @@ class MockServletContextTests {
void getResourcePaths() {
Set<String> paths = servletContext.getResourcePaths("/web");
assertThat(paths).isNotNull();
assertThat(paths.contains("/web/MockServletContextTests.class")).isTrue();
assertThat(paths).contains("/web/MockServletContextTests.class");
}
@Test
void getResourcePathsWithSubdirectories() {
Set<String> paths = servletContext.getResourcePaths("/");
assertThat(paths).isNotNull();
assertThat(paths.contains("/web/")).isTrue();
assertThat(paths).contains("/web/");
}
@Test