Update Robolectric tests to use google truth
Bug: 31545801 Test: make RunSettingsRoboTests Change-Id: Idb801d51b6a4dc02ea062bc32086e1a8fc28b94b
This commit is contained in:
@@ -23,9 +23,8 @@ import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
|
||||
@@ -33,10 +32,10 @@ public class ThreadUtilsTest {
|
||||
|
||||
@Test
|
||||
public void testMainThread() throws InterruptedException {
|
||||
assertTrue(ThreadUtils.isMainThread());
|
||||
assertThat(ThreadUtils.isMainThread()).isTrue();
|
||||
Thread background = new Thread(new Runnable() {
|
||||
public void run() {
|
||||
assertFalse(ThreadUtils.isMainThread());
|
||||
assertThat(ThreadUtils.isMainThread()).isFalse();
|
||||
}
|
||||
});
|
||||
background.start();
|
||||
|
Reference in New Issue
Block a user