Search in sources :

Example 91 with SmallTest

use of android.support.test.filters.SmallTest in project AnyMemo by helloworld1.

the class DefaultSchedulerTest method testScheduleFailedCardSuccess.

@SmallTest
@Test
public void testScheduleFailedCardSuccess() {
    LearningData newLd = defaultScheduler.schedule(failedCardLearningData, 5, false);
    assertFalse(defaultScheduler.isCardForReview(newLd));
    assertFalse(defaultScheduler.isCardNew(newLd));
    assertTrue(defaultScheduler.isCardLearned(newLd));
}
Also used : LearningData(org.liberty.android.fantastischmemo.entity.LearningData) SmallTest(android.support.test.filters.SmallTest) AbstractPreferencesTest(org.liberty.android.fantastischmemo.test.AbstractPreferencesTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 92 with SmallTest

use of android.support.test.filters.SmallTest in project AnyMemo by helloworld1.

the class DefaultSchedulerTest method testScheduleFailedCardFailure.

@SmallTest
@Test
public void testScheduleFailedCardFailure() {
    LearningData newLd = defaultScheduler.schedule(failedCardLearningData, 0, false);
    assertTrue(defaultScheduler.isCardForReview(newLd));
    assertFalse(defaultScheduler.isCardNew(newLd));
    assertFalse(defaultScheduler.isCardLearned(newLd));
}
Also used : LearningData(org.liberty.android.fantastischmemo.entity.LearningData) SmallTest(android.support.test.filters.SmallTest) AbstractPreferencesTest(org.liberty.android.fantastischmemo.test.AbstractPreferencesTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 93 with SmallTest

use of android.support.test.filters.SmallTest in project AnyMemo by helloworld1.

the class DefaultSchedulerTest method testScheduleNewCardSuccess.

@SmallTest
@Test
public void testScheduleNewCardSuccess() {
    LearningData ld = new LearningData();
    LearningData newLd = defaultScheduler.schedule(ld, 3, false);
    assertFalse(defaultScheduler.isCardForReview(newLd));
    assertFalse(defaultScheduler.isCardNew(newLd));
    assertTrue(defaultScheduler.isCardLearned(newLd));
    assertEquals(3, (int) newLd.getGrade());
}
Also used : LearningData(org.liberty.android.fantastischmemo.entity.LearningData) SmallTest(android.support.test.filters.SmallTest) AbstractPreferencesTest(org.liberty.android.fantastischmemo.test.AbstractPreferencesTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 94 with SmallTest

use of android.support.test.filters.SmallTest in project AnyMemo by helloworld1.

the class DefaultSchedulerTest method testScheduleForScheduleCardFailure.

@SmallTest
@Test
public void testScheduleForScheduleCardFailure() {
    LearningData newLd = defaultScheduler.schedule(forReviewCardLearningData, 0, false);
    assertTrue(defaultScheduler.isCardForReview(newLd));
    assertFalse(defaultScheduler.isCardNew(newLd));
    assertFalse(defaultScheduler.isCardLearned(newLd));
}
Also used : LearningData(org.liberty.android.fantastischmemo.entity.LearningData) SmallTest(android.support.test.filters.SmallTest) AbstractPreferencesTest(org.liberty.android.fantastischmemo.test.AbstractPreferencesTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 95 with SmallTest

use of android.support.test.filters.SmallTest in project AnyMemo by helloworld1.

the class DefaultSchedulerTest method testScheduleNewCardFailure.

@SmallTest
@Test
public void testScheduleNewCardFailure() {
    LearningData newLd = defaultScheduler.schedule(newCardLearningData, 0, false);
    assertTrue(defaultScheduler.isCardForReview(newLd));
    assertFalse(defaultScheduler.isCardNew(newLd));
    assertFalse(defaultScheduler.isCardLearned(newLd));
    assertEquals(0, (int) newLd.getGrade());
}
Also used : LearningData(org.liberty.android.fantastischmemo.entity.LearningData) SmallTest(android.support.test.filters.SmallTest) AbstractPreferencesTest(org.liberty.android.fantastischmemo.test.AbstractPreferencesTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Aggregations

SmallTest (android.support.test.filters.SmallTest)252 Test (org.junit.Test)137 AbstractExistingDBTest (org.liberty.android.fantastischmemo.test.AbstractExistingDBTest)86 Parcel (android.os.Parcel)48 TimeBase (com.android.internal.os.BatteryStatsImpl.TimeBase)45 Card (org.liberty.android.fantastischmemo.entity.Card)43 CardDao (org.liberty.android.fantastischmemo.dao.CardDao)37 Setting (org.liberty.android.fantastischmemo.entity.Setting)21 Binder (android.os.Binder)20 Category (org.liberty.android.fantastischmemo.entity.Category)17 AbstractPreferencesTest (org.liberty.android.fantastischmemo.test.AbstractPreferencesTest)17 LearningData (org.liberty.android.fantastischmemo.entity.LearningData)15 UiThreadTest (android.support.test.annotation.UiThreadTest)14 CategoryDao (org.liberty.android.fantastischmemo.dao.CategoryDao)13 LocaleList (android.os.LocaleList)10 Option (org.liberty.android.fantastischmemo.entity.Option)9 QueueManager (org.liberty.android.fantastischmemo.queue.QueueManager)9 ContentResolver (android.content.ContentResolver)8 Cursor (android.database.Cursor)8 OnTickListener (com.tmall.wireless.tangram.support.TimerSupport.OnTickListener)8