Merge branch 'dev' into pull/austil
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 21 KiB |
@@ -121,7 +121,7 @@ public class BaseAndroidTest extends TestCase
|
||||
|
||||
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)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.isoron.uhabits.pebble;
|
||||
package org.isoron.uhabits.receivers;
|
||||
|
||||
import android.content.*;
|
||||
import android.support.annotation.*;
|
||||
@@ -29,12 +29,13 @@ import com.getpebble.android.kit.util.*;
|
||||
|
||||
import org.isoron.uhabits.*;
|
||||
import org.isoron.uhabits.core.models.*;
|
||||
import org.isoron.uhabits.receivers.*;
|
||||
import org.json.*;
|
||||
import org.junit.*;
|
||||
import org.junit.runner.*;
|
||||
|
||||
import static com.getpebble.android.kit.Constants.*;
|
||||
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 org.hamcrest.MatcherAssert.*;
|
||||
import static org.hamcrest.core.IsEqual.*;
|
||||
|
||||
@@ -63,6 +64,8 @@ public class PebbleReceiverTest extends BaseAndroidTest
|
||||
@Test
|
||||
public void testCount() throws Exception
|
||||
{
|
||||
if(SDK_INT <= KITKAT) return;
|
||||
|
||||
onPebbleReceived((dict) -> {
|
||||
assertThat(dict.getString(0), equalTo("COUNT"));
|
||||
assertThat(dict.getInteger(1), equalTo(2L));
|
||||
@@ -76,6 +79,8 @@ public class PebbleReceiverTest extends BaseAndroidTest
|
||||
@Test
|
||||
public void testFetch() throws Exception
|
||||
{
|
||||
if(SDK_INT <= KITKAT) return;
|
||||
|
||||
onPebbleReceived((dict) -> {
|
||||
assertThat(dict.getString(0), equalTo("HABIT"));
|
||||
assertThat(dict.getInteger(1), equalTo(habit2.getId()));
|
||||
|
||||