Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1212b0ea authored by Matthew Fritze's avatar Matthew Fritze
Browse files

Add example of google truth in a non robolectric test

Change-Id: I6549ae01b31df39462d252e767fc3255b05813fe
Fixes: 34277648
Test: make SettingsUnitTests, make RunSettingsRoboTests
parent 1c6f9de1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -32,8 +32,7 @@ import org.junit.runner.RunWith;

import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static com.google.common.truth.Truth.assertThat;

@SmallTest
@RunWith(AndroidJUnit4.class)
@@ -47,7 +46,8 @@ public class SearchActivityTest {
        final List<ResolveInfo> resolveInfos = packageManager.queryIntentActivities(
                intent, PackageManager.GET_META_DATA);

        assertFalse(resolveInfos.isEmpty());
        assertEquals(Settings.class.getName(), resolveInfos.get(0).activityInfo.parentActivityName);
        assertThat(resolveInfos).isNotEmpty();
        assertThat(resolveInfos.get(0).activityInfo.parentActivityName)
                .isEqualTo(Settings.class.getName());
    }
}