modified build.gradle to return default values during testing.
This commit is contained in:
@@ -16,6 +16,10 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests.returnDefaultValues = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
package uk.org.openseizuredetector;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import java.util.regex.Pattern;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@@ -16,7 +23,11 @@ public class OsdUtilTest {
|
||||
|
||||
@Test
|
||||
public void testStartServer() throws Exception {
|
||||
|
||||
//Activity a = new Activity();
|
||||
OsdUtil util = new OsdUtil(null);
|
||||
assertThat(util.isServerRunning(), is(true));
|
||||
assertThat(true, is (true));
|
||||
//assertThat(true, is(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user