Had a go at adding a simple automatic test - can't make it work though!

This commit is contained in:
Graham Jones
2015-12-11 21:56:50 +00:00
parent 71e2697a81
commit 1af6e8787f
2 changed files with 21 additions and 0 deletions

View File

@@ -22,4 +22,12 @@ dependencies {
compile files('libs/mpandroidchartlibrary-2-0-7.jar') compile files('libs/mpandroidchartlibrary-2-0-7.jar')
compile files('libs/pebblekit-2.6.0-eclipse.jar') compile files('libs/pebblekit-2.6.0-eclipse.jar')
compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.android.support:appcompat-v7:22.2.1'
// Unit testing dependencies
testCompile 'junit:junit:4.12'
// Set this dependency if you want to use Mockito
testCompile 'org.mockito:mockito-core:1.10.19'
// Set this dependency if you want to use Hamcrest matching
testCompile 'org.hamcrest:hamcrest-library:1.1'
} }

View File

@@ -0,0 +1,13 @@
import org.junit.Test;
import java.util.regex.Pattern;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class SdServiceConnectionTest {
@Test
public void isconnected_test() {
assertThat(SdServiceConnection.isConnected(), is(true));
}
...
}