Skip to content

Commit

Permalink
Merge pull request #136 from SecUSo/fix-unit-tests
Browse files Browse the repository at this point in the history
Fix `ApplicationTest.java`
  • Loading branch information
udenr authored Jan 23, 2024
2 parents e705e03 + 12600ad commit 690f1fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
implementation 'androidx.multidex:multidex:2.0.1' //with androidx libraries

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'

def work_version = '2.9.0'
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-runtime-ktx:$work_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
package org.secuso.privacyfriendlyactivitytracker;

import android.app.Application;
import android.test.ApplicationTestCase;
import static junit.framework.TestCase.assertEquals;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

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 instrumentationTest() throws Exception {
assertEquals("org.secuso.privacyfriendlyactivitytracker", InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageName());
}
}

0 comments on commit 690f1fe

Please sign in to comment.