mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2024-11-10 06:52:06 +00:00
java: Implement Initial TDD for further testing purposes
This commit is contained in:
parent
1a8ba6767a
commit
a868cb2803
2 changed files with 43 additions and 0 deletions
|
@ -29,6 +29,7 @@ android {
|
|||
// libraries Gradle should build and package with your APK.
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@ -70,5 +71,10 @@ dependencies {
|
|||
api 'com.github.erz05:JoyStick:1.1.0'
|
||||
implementation 'com.loopj.android:android-async-http:1.4.10'
|
||||
implementation 'com.google.guava:guava:29.0-android'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.0'
|
||||
androidTestImplementation 'com.android.support.test:runner:0.3'
|
||||
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
}
|
||||
|
|
37
app/src/androidTest/java/org/etlegacy/app/TestETL.java
Normal file
37
app/src/androidTest/java/org/etlegacy/app/TestETL.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package org.etlegacy.app;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import com.robotium.solo.Solo;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Instrumentation test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class TestETL {
|
||||
|
||||
private Solo solo;
|
||||
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("org.etlegacy.app", appContext.getPackageName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void clickOnNickEntry() throws Exception {
|
||||
// Perform click on Nickname Entry
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue