mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Disable PebbleReceiver tests on KitKat
This commit is contained in:
@@ -121,7 +121,7 @@ public class BaseAndroidTest extends TestCase
|
|||||||
|
|
||||||
protected void awaitLatch() throws InterruptedException
|
protected void awaitLatch() throws InterruptedException
|
||||||
{
|
{
|
||||||
assertTrue(latch.await(60, TimeUnit.SECONDS));
|
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setLocale(@NonNull String language, @NonNull String country)
|
protected void setLocale(@NonNull String language, @NonNull String country)
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ import org.json.*;
|
|||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
import org.junit.runner.*;
|
import org.junit.runner.*;
|
||||||
|
|
||||||
|
import static android.os.Build.VERSION.SDK_INT;
|
||||||
|
import static android.os.Build.VERSION_CODES.KITKAT;
|
||||||
import static com.getpebble.android.kit.Constants.MSG_DATA;
|
import static com.getpebble.android.kit.Constants.MSG_DATA;
|
||||||
import static org.hamcrest.MatcherAssert.*;
|
import static org.hamcrest.MatcherAssert.*;
|
||||||
import static org.hamcrest.core.IsEqual.*;
|
import static org.hamcrest.core.IsEqual.*;
|
||||||
@@ -62,6 +64,8 @@ public class PebbleReceiverTest extends BaseAndroidTest
|
|||||||
@Test
|
@Test
|
||||||
public void testCount() throws Exception
|
public void testCount() throws Exception
|
||||||
{
|
{
|
||||||
|
if(SDK_INT <= KITKAT) return;
|
||||||
|
|
||||||
onPebbleReceived((dict) -> {
|
onPebbleReceived((dict) -> {
|
||||||
assertThat(dict.getString(0), equalTo("COUNT"));
|
assertThat(dict.getString(0), equalTo("COUNT"));
|
||||||
assertThat(dict.getInteger(1), equalTo(2L));
|
assertThat(dict.getInteger(1), equalTo(2L));
|
||||||
@@ -75,6 +79,8 @@ public class PebbleReceiverTest extends BaseAndroidTest
|
|||||||
@Test
|
@Test
|
||||||
public void testFetch() throws Exception
|
public void testFetch() throws Exception
|
||||||
{
|
{
|
||||||
|
if(SDK_INT <= KITKAT) return;
|
||||||
|
|
||||||
onPebbleReceived((dict) -> {
|
onPebbleReceived((dict) -> {
|
||||||
assertThat(dict.getString(0), equalTo("HABIT"));
|
assertThat(dict.getString(0), equalTo("HABIT"));
|
||||||
assertThat(dict.getInteger(1), equalTo(habit2.getId()));
|
assertThat(dict.getInteger(1), equalTo(habit2.getId()));
|
||||||
|
|||||||
Reference in New Issue
Block a user