Skip to content

Commit

Permalink
Instrumentation Tests Configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan Khanna committed Aug 12, 2014
1 parent 37c4873 commit e62bd7a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 4 deletions.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 28 23:16:05 PDT 2014
#Tue Aug 12 20:57:57 IST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
2 changes: 1 addition & 1 deletion mifosng-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
minSdkVersion 10
targetSdkVersion 19
}
sourceSets { main { java.srcDirs = ['src/main/java', 'src/test/java/'] } }
sourceSets { main { java.srcDirs = ['src/main/java', 'src/instrumentTest/java/'] } }
productFlavors {
}
buildTypes {
Expand Down
6 changes: 5 additions & 1 deletion mifosng-android/mifosng-android.iml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
Expand All @@ -57,9 +57,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates" />
<excludeFolder url="file://$MODULE_DIR$/build/native-libs" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/test-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/test-report" />
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* This project is licensed under the open source MPL V2.
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/

package com.mifos.mifosxdroid.tests;

import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.View;
import android.widget.EditText;

import com.mifos.mifosxdroid.LoginActivity;
import com.mifos.mifosxdroid.R;

/**
* Created by ishankhanna on 12/08/14.
*/
public class LoginActivityTest extends ActivityInstrumentationTestCase2<LoginActivity> {

LoginActivity loginActivity;
EditText et_instance;

public LoginActivityTest() {
super(LoginActivity.class);
}

@Override
public void setUp() throws Exception {
super.setUp();

loginActivity = getActivity();
et_instance = (EditText) loginActivity.findViewById(R.id.et_instanceURL);
}

@SmallTest
public void testEditTextsAreNotNull() {

assertNotNull(et_instance);

}

@SmallTest
public void testAllEditTextsAreVisible() {

assertEquals(View.VISIBLE, et_instance.getVisibility());

}
}

0 comments on commit e62bd7a

Please sign in to comment.