Fix tests, test runner for core tests
This commit is contained in:
parent
b0f0d106da
commit
25cbb00b36
|
@ -376,7 +376,7 @@ public class DBReaderTest extends InstrumentationTestCase {
|
|||
List<Feed> feeds = DBTestUtils.saveFeedlist(context, NUM_FEEDS, NUM_ITEMS, true);
|
||||
DBReader.NavDrawerData navDrawerData = DBReader.getNavDrawerData(context);
|
||||
assertEquals(NUM_FEEDS, navDrawerData.feeds.size());
|
||||
assertEquals(0, navDrawerData.numUnreadItems);
|
||||
assertEquals(0, navDrawerData.numNewItems);
|
||||
assertEquals(0, navDrawerData.queueSize);
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ public class DBReaderTest extends InstrumentationTestCase {
|
|||
|
||||
DBReader.NavDrawerData navDrawerData = DBReader.getNavDrawerData(context);
|
||||
assertEquals(NUM_FEEDS, navDrawerData.feeds.size());
|
||||
assertEquals(NUM_UNREAD, navDrawerData.numUnreadItems);
|
||||
assertEquals(NUM_UNREAD, navDrawerData.numNewItems);
|
||||
assertEquals(NUM_QUEUE, navDrawerData.queueSize);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ android {
|
|||
targetSdkVersion 21
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testApplicationId "de.danoeh.antennapod.core.tests"
|
||||
testInstrumentationRunner "de.danoeh.antennapod.core.tests.AntennaPodTestRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package de.danoeh.antennapod.core.test;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package de.danoeh.antennapod.core.tests;
|
||||
|
||||
import android.test.InstrumentationTestRunner;
|
||||
import android.test.suitebuilder.TestSuiteBuilder;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
public class AntennaPodTestRunner extends InstrumentationTestRunner {
|
||||
|
||||
@Override
|
||||
public TestSuite getAllTests() {
|
||||
return new TestSuiteBuilder(AntennaPodTestRunner.class)
|
||||
.includeAllPackagesUnderHere()
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.core.util;
|
||||
package de.danoeh.antennapod.core.tests.util;
|
||||
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
@ -7,6 +7,8 @@ import java.util.Date;
|
|||
import java.util.GregorianCalendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import de.danoeh.antennapod.core.util.DateUtils;
|
||||
|
||||
public class DateUtilsTest extends AndroidTestCase {
|
||||
|
||||
public void testParseDateWithMicroseconds() throws Exception {
|
|
@ -1,7 +1,9 @@
|
|||
package de.danoeh.antennapod.core.util;
|
||||
package de.danoeh.antennapod.core.tests.util;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import de.danoeh.antennapod.core.util.LongIntMap;
|
||||
|
||||
public class LongLongMapTest extends AndroidTestCase {
|
||||
|
||||
public void testEmptyMap() {
|
Loading…
Reference in New Issue