-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have special test runner and app to have initial settings for tests
Disable Season Greetings on tests. Tests should not fail on christmas :)
- Loading branch information
1 parent
de748b7
commit b045ad8
Showing
6 changed files
with
49 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/src/androidTest/java/org/gdg/frisbee/android/FrisbeeTestRunner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.gdg.frisbee.android; | ||
|
||
import android.app.Application; | ||
import android.content.Context; | ||
import android.support.test.runner.AndroidJUnitRunner; | ||
|
||
import org.gdg.frisbee.android.app.TestApp; | ||
|
||
public class FrisbeeTestRunner extends AndroidJUnitRunner { | ||
|
||
@Override | ||
public Application newApplication(ClassLoader cl, String className, Context context) | ||
throws InstantiationException, IllegalAccessException, ClassNotFoundException { | ||
return super.newApplication(cl, TestApp.class.getName(), context); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
app/src/androidTest/java/org/gdg/frisbee/android/app/TestApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.gdg.frisbee.android.app; | ||
|
||
|
||
import org.gdg.frisbee.android.utils.PrefUtils; | ||
|
||
public class TestApp extends App { | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
|
||
PrefUtils.setInitialSettings(this, false); | ||
PrefUtils.skipSeasonsGreetings(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters