Skip to content

Commit 8367fc3

Browse files
Andrei Shikovfacebook-github-bot
authored andcommitted
Replace fest with assertj (facebook#32770)
Summary: Pull Request resolved: facebook#32770 Fest is EOL and is replaced by assertj, originally a fork of Fest. This change replaces the usages in internal tests and removes the dependency. Changelog: [Internal][Android] Replace fest with assertj Reviewed By: genkikondo Differential Revision: D33143454 fbshipit-source-id: c1cbe5b064d007018f73858b2913806c11aa08af
1 parent a4b9e4c commit 8367fc3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+58
-80
lines changed

ReactAndroid/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ dependencies {
380380
testImplementation("org.powermock:powermock-module-junit4-rule:${POWERMOCK_VERSION}")
381381
testImplementation("org.powermock:powermock-classloading-xstream:${POWERMOCK_VERSION}")
382382
testImplementation("org.mockito:mockito-core:${MOCKITO_CORE_VERSION}")
383-
testImplementation("org.easytesting:fest-assert-core:2.0M10")
383+
testImplementation("org.assertj:assertj-core:3.21.0")
384384
testImplementation("org.robolectric:robolectric:${ROBOLECTRIC_VERSION}")
385385

386386
androidTestImplementation(fileTree(dir: "src/main/third-party/java/buck-android-support/", include: ["*.jar"]))

ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rn_android_library(
1414
is_androidx = True,
1515
deps = [
1616
react_native_dep("third-party/android/androidx:test-espresso-core"),
17-
react_native_dep("third-party/java/fest:fest"),
17+
react_native_dep("third-party/java/assertj:assertj-core"),
1818
react_native_dep("third-party/java/junit:junit"),
1919
react_native_dep("third-party/android/androidx:test-rules"),
2020
react_native_dep("third-party/android/androidx:test-runner"),

ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/ReactRootViewTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package com.facebook.react.tests.core;
99

10-
import static org.fest.assertions.api.Assertions.assertThat;
10+
import static org.assertj.core.api.Assertions.assertThat;
1111

1212
import android.app.Instrumentation;
1313
import android.view.View;

ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/WritableNativeMapTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package com.facebook.react.tests.core;
99

10-
import static org.fest.assertions.api.Assertions.assertThat;
10+
import static org.assertj.core.api.Assertions.assertThat;
1111

1212
import androidx.test.runner.AndroidJUnit4;
1313
import com.facebook.react.bridge.NoSuchKeyException;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
2+
load("//tools/build_defs/oss:rn_defs.bzl", "rn_prebuilt_jar")
3+
4+
rn_prebuilt_jar(
5+
name = "assertj-core",
6+
binary_jar = ":assertj-core.jar",
7+
visibility = ["//ReactAndroid/..."],
8+
)
9+
10+
fb_native.remote_file(
11+
name = "assertj-core.jar",
12+
sha1 = "27a14d6d22c4e3d58f799fb2a5ca8eaf53e6942a",
13+
url = "mvn:org.assertj:assertj-core:jar:3.21.0",
14+
)

ReactAndroid/src/main/third-party/java/fest/BUCK

Lines changed: 0 additions & 36 deletions
This file was deleted.

ReactAndroid/src/test/java/com/facebook/react/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rn_robolectric_test(
1111
react_native_dep("third-party/android/androidx:fragment"),
1212
react_native_dep("third-party/android/androidx:legacy-support-core-ui"),
1313
react_native_dep("third-party/android/androidx:legacy-support-core-utils"),
14-
react_native_dep("third-party/java/fest:fest"),
14+
react_native_dep("third-party/java/assertj:assertj-core"),
1515
react_native_dep("third-party/java/jsr-305:jsr-305"),
1616
react_native_dep("third-party/java/junit:junit"),
1717
react_native_dep("third-party/java/okhttp:okhttp3"),

ReactAndroid/src/test/java/com/facebook/react/RootViewTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package com.facebook.react;
99

10-
import static org.fest.assertions.api.Assertions.assertThat;
10+
import static org.assertj.core.api.Assertions.assertThat;
1111
import static org.mockito.Matchers.any;
1212
import static org.mockito.Matchers.eq;
1313
import static org.mockito.Mockito.mock;

ReactAndroid/src/test/java/com/facebook/react/animated/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rn_robolectric_test(
88
"PUBLIC",
99
],
1010
deps = [
11-
react_native_dep("third-party/java/fest:fest"),
11+
react_native_dep("third-party/java/assertj:assertj-core"),
1212
react_native_dep("third-party/java/jsr-305:jsr-305"),
1313
react_native_dep("third-party/java/junit:junit"),
1414
react_native_target("java/com/facebook/react:react"),

ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedInterpolationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package com.facebook.react.animated;
99

10-
import static org.fest.assertions.api.Assertions.assertThat;
10+
import static org.assertj.core.api.Assertions.assertThat;
1111

1212
import org.junit.Test;
1313
import org.junit.runner.RunWith;

0 commit comments

Comments
 (0)