Search in sources :

Example 6 with AMPrefUtil

use of org.liberty.android.fantastischmemo.utils.AMPrefUtil in project AnyMemo by helloworld1.

the class ImportMergingTest method setUp.

@Before
public void setUp() throws Exception {
    // Reflect out the test context
    testContext = getContext();
    amFileUtil = new AMFileUtil(testContext, new AMPrefUtil(getContext()));
    newDbCardList = new ArrayList<Card>();
    Card c1 = new Card();
    c1.setQuestion("old question 1");
    c1.setAnswer("old answer 1");
    c1.setLearningData(new LearningData());
    c1.setCategory(new Category());
    Card c2 = new Card();
    c2.setQuestion("old question 2");
    c2.setAnswer("old answer 2");
    c2.setLearningData(new LearningData());
    c2.setCategory(new Category());
    newDbCardList.add(c1);
    newDbCardList.add(c2);
}
Also used : Category(org.liberty.android.fantastischmemo.entity.Category) AMFileUtil(org.liberty.android.fantastischmemo.utils.AMFileUtil) LearningData(org.liberty.android.fantastischmemo.entity.LearningData) AMPrefUtil(org.liberty.android.fantastischmemo.utils.AMPrefUtil) Card(org.liberty.android.fantastischmemo.entity.Card) Before(org.junit.Before)

Aggregations

AMPrefUtil (org.liberty.android.fantastischmemo.utils.AMPrefUtil)6 AMFileUtil (org.liberty.android.fantastischmemo.utils.AMFileUtil)5 Before (org.junit.Before)3 Display (android.view.Display)1 WindowManager (android.view.WindowManager)1 SmallTest (androidx.test.filters.SmallTest)1 File (java.io.File)1 Test (org.junit.Test)1 Card (org.liberty.android.fantastischmemo.entity.Card)1 Category (org.liberty.android.fantastischmemo.entity.Category)1 LearningData (org.liberty.android.fantastischmemo.entity.LearningData)1 Option (org.liberty.android.fantastischmemo.entity.Option)1 AppComponents (org.liberty.android.fantastischmemo.modules.AppComponents)1 AbstractExistingDBTest (org.liberty.android.fantastischmemo.test.AbstractExistingDBTest)1 CardImageGetter (org.liberty.android.fantastischmemo.ui.CardImageGetter)1