File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
runner/AndroidTestOrchestratorSample
src/androidTest/java/com/example/android/testing/androidtestorchestratorsample Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -39,4 +39,6 @@ dependencies {
3939 androidTestImplementation ' androidx.test:monitor:' + rootProject. monitorVersion;
4040 androidTestImplementation ' androidx.test.espresso:espresso-core:' + rootProject. espressoVersion;
4141 androidTestUtil ' androidx.test:orchestrator:' + rootProject. orchestratorVersion;
42+
43+ androidTestImplementation ' com.google.truth:truth:' + rootProject. truthVersion;
4244}
Original file line number Diff line number Diff line change 1616
1717package com .example .android .testing .androidtestorchestratorsample ;
1818
19+ import static com .google .common .truth .Truth .assertThat ;
20+
1921import org .junit .Before ;
2022import org .junit .Test ;
2123import org .junit .runner .RunWith ;
2628import java .lang .Iterable ;
2729import java .util .Arrays ;
2830
29- import static org .hamcrest .CoreMatchers .equalTo ;
30- import static org .hamcrest .CoreMatchers .is ;
31- import static org .junit .Assert .assertThat ;
3231import static org .junit .runners .Parameterized .Parameters ;
3332
3433
@@ -88,6 +87,6 @@ public void setUp() {
8887 @ Test
8988 public void testAdd_TwoNumbers () {
9089 double resultAdd = mCalculator .add (mOperandOne , mOperandTwo );
91- assertThat (resultAdd , is ( equalTo ( mExpectedResult )) );
90+ assertThat (resultAdd ). isEqualTo ( mExpectedResult );
9291 }
9392}
Original file line number Diff line number Diff line change 3434 rulesVersion = " 1.4.1-alpha05"
3535 espressoVersion = " 3.5.0-alpha05"
3636 orchestratorVersion = " 1.4.2-alpha02"
37+ truthVersion = " 1.1.3"
3738}
You can’t perform that action at this time.
0 commit comments