Skip to content

Commit 8f19b1a

Browse files
committed
[java] Using assertj instead of hamcrest
1 parent d5435ee commit 8f19b1a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

java/client/test/org/openqa/selenium/atoms/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ java_library(
1818
name = "lib",
1919
srcs = ["JavaScriptLoader.java"],
2020
deps = [
21+
artifact("org.assertj:assertj-core"),
2122
artifact("com.google.guava:guava"),
22-
artifact("org.hamcrest:hamcrest"),
2323
artifact("junit:junit"),
2424
],
2525
)

java/client/test/org/openqa/selenium/atoms/JavaScriptLoader.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
package org.openqa.selenium.atoms;
1919

2020
import static java.nio.charset.StandardCharsets.UTF_8;
21-
import static org.hamcrest.CoreMatchers.notNullValue;
22-
import static org.junit.Assume.assumeThat;
21+
import static org.assertj.core.api.Assumptions.assumeThat;
2322

2423
import com.google.common.io.Resources;
2524

@@ -34,9 +33,9 @@ private JavaScriptLoader() {} // Utility class.
3433

3534
static String loadResource(String resourcePath) throws IOException {
3635
URL resourceUrl = JavaScriptLoader.class.getResource(resourcePath);
37-
assumeThat(
38-
"Resource not found; are you running with `bazel test`? " + resourcePath,
39-
resourceUrl, notNullValue());
36+
assumeThat(resourceUrl)
37+
.isNotNull()
38+
.as("Resource not found; are you running with `bazel test`? " + resourcePath);
4039
return Resources.toString(resourceUrl, UTF_8);
4140
}
4241
}

0 commit comments

Comments
 (0)