Wrapped OsdUtil Toast calls in a RunOnUIThread function to avoid occasional crashes when beeping. Closes #8

This commit is contained in:
Graham Jones
2016-07-22 18:36:40 +01:00
parent ffd731c85d
commit 4f71b024b5
7 changed files with 35 additions and 84 deletions

View File

@@ -1,6 +1,7 @@
package uk.org.openseizuredetector;
import android.app.Activity;
import android.os.Handler;
import org.junit.Before;
import org.junit.Test;
@@ -24,7 +25,8 @@ public class OsdUtilTest {
@Test
public void testStartServer() throws Exception {
//Activity a = new Activity();
OsdUtil util = new OsdUtil(null);
Handler handler = new Handler();
OsdUtil util = new OsdUtil(null,handler);
assertThat(util.isServerRunning(), is(true));
assertThat(true, is (true));
//assertThat(true, is(false));