Had a go at adding a simple automatic test - can't make it work though!
This commit is contained in:
@@ -22,4 +22,12 @@ dependencies {
|
||||
compile files('libs/mpandroidchartlibrary-2-0-7.jar')
|
||||
compile files('libs/pebblekit-2.6.0-eclipse.jar')
|
||||
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'
|
||||
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
...
|
||||
}
|
||||
Reference in New Issue
Block a user