-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
137 additions
and
85 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
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
25 changes: 18 additions & 7 deletions
25
...a/privacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/ApplicationTest.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 |
---|---|---|
@@ -1,15 +1,26 @@ | ||
package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist; | ||
|
||
import android.app.Application; | ||
import android.test.ApplicationTestCase; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
import androidx.test.core.app.ApplicationProvider; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
import androidx.test.platform.app.InstrumentationRegistry; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
/** | ||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> | ||
*/ | ||
public class ApplicationTest extends ApplicationTestCase<Application> | ||
{ | ||
public ApplicationTest() | ||
{ | ||
super(Application.class); | ||
@RunWith(AndroidJUnit4.class) | ||
public class ApplicationTest { | ||
@Test | ||
public void useApplicationContext() { | ||
assertEquals("privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist", ApplicationProvider.getApplicationContext().getPackageName()); | ||
} | ||
|
||
@Test | ||
public void useContext() { | ||
assertEquals("privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.test", InstrumentationRegistry.getInstrumentation().getContext().getPackageName()); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...ivacyfriendlyshoppinglist/secuso/org/privacyfriendlyshoppinglist/MainActivityBasicTest.kt
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,26 @@ | ||
package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist | ||
|
||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.action.ViewActions.click | ||
import androidx.test.espresso.matcher.ViewMatchers.withContentDescription | ||
import androidx.test.ext.junit.rules.ActivityScenarioRule | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.ui.main.MainActivity | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class MainActivityBasicTest { | ||
@get: Rule | ||
var mActivityRule = ActivityScenarioRule(MainActivity::class.java) | ||
|
||
@Test | ||
fun launchActivity() { | ||
} | ||
|
||
@Test | ||
fun openDrawer() { | ||
onView(withContentDescription(R.string.navigation_drawer_open)).perform(click()) | ||
} | ||
} |
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
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
5 changes: 5 additions & 0 deletions
5
.../org/privacyfriendlyshoppinglist/logic/shoppingList/business/ShoppingListServiceTest.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
Oops, something went wrong.