Search in sources :

Example 6 with Setting

use of org.liberty.android.fantastischmemo.entity.Setting in project AnyMemo by helloworld1.

the class SettingTest method testQuestionTextColor.

@SmallTest
@Test
public void testQuestionTextColor() throws Exception {
    Setting setting = getCurrentSetting();
    setting.setQuestionTextColor(Color.RED);
    Setting savedSetting = setSetting(setting);
    assertEquals(Color.RED, (int) savedSetting.getQuestionTextColor());
}
Also used : Setting(org.liberty.android.fantastischmemo.entity.Setting) SmallTest(android.support.test.filters.SmallTest) AbstractExistingDBTest(org.liberty.android.fantastischmemo.test.AbstractExistingDBTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 7 with Setting

use of org.liberty.android.fantastischmemo.entity.Setting in project AnyMemo by helloworld1.

the class SettingTest method testDisplayInHTML.

@SmallTest
@Test
public void testDisplayInHTML() throws Exception {
    Setting setting = getCurrentSetting();
    setting.setDisplayInHTMLEnum(EnumSet.of(Setting.CardField.NOTE, Setting.CardField.ANSWER));
    Setting savedSetting = setSetting(setting);
    assertEquals(EnumSet.of(Setting.CardField.NOTE, Setting.CardField.ANSWER), savedSetting.getDisplayInHTMLEnum());
}
Also used : Setting(org.liberty.android.fantastischmemo.entity.Setting) SmallTest(android.support.test.filters.SmallTest) AbstractExistingDBTest(org.liberty.android.fantastischmemo.test.AbstractExistingDBTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 8 with Setting

use of org.liberty.android.fantastischmemo.entity.Setting in project AnyMemo by helloworld1.

the class SettingTest method testQuestionField.

@SmallTest
@Test
public void testQuestionField() throws Exception {
    Setting setting = getCurrentSetting();
    setting.setQuestionFieldEnum(EnumSet.of(Setting.CardField.NOTE, Setting.CardField.ANSWER));
    Setting savedSetting = setSetting(setting);
    assertEquals(EnumSet.of(Setting.CardField.NOTE, Setting.CardField.ANSWER), savedSetting.getQuestionFieldEnum());
}
Also used : Setting(org.liberty.android.fantastischmemo.entity.Setting) SmallTest(android.support.test.filters.SmallTest) AbstractExistingDBTest(org.liberty.android.fantastischmemo.test.AbstractExistingDBTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 9 with Setting

use of org.liberty.android.fantastischmemo.entity.Setting in project AnyMemo by helloworld1.

the class SettingTest method testAnswerAudio.

@SmallTest
@Test
public void testAnswerAudio() throws Exception {
    Setting setting = getCurrentSetting();
    setting.setAnswerAudio("DE");
    Setting savedSetting = setSetting(setting);
    assertEquals("DE", savedSetting.getAnswerAudio());
}
Also used : Setting(org.liberty.android.fantastischmemo.entity.Setting) SmallTest(android.support.test.filters.SmallTest) AbstractExistingDBTest(org.liberty.android.fantastischmemo.test.AbstractExistingDBTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Example 10 with Setting

use of org.liberty.android.fantastischmemo.entity.Setting in project AnyMemo by helloworld1.

the class SettingTest method testQARatio.

@SmallTest
@Test
public void testQARatio() throws Exception {
    Setting setting = getCurrentSetting();
    setting.setQaRatio(70);
    Setting savedSetting = setSetting(setting);
    assertEquals(70, (int) savedSetting.getQaRatio());
}
Also used : Setting(org.liberty.android.fantastischmemo.entity.Setting) SmallTest(android.support.test.filters.SmallTest) AbstractExistingDBTest(org.liberty.android.fantastischmemo.test.AbstractExistingDBTest) Test(org.junit.Test) SmallTest(android.support.test.filters.SmallTest)

Aggregations

Setting (org.liberty.android.fantastischmemo.entity.Setting)23 SmallTest (android.support.test.filters.SmallTest)21 Test (org.junit.Test)21 AbstractExistingDBTest (org.liberty.android.fantastischmemo.test.AbstractExistingDBTest)21 GestureOverlayView (android.gesture.GestureOverlayView)1 Bundle (android.os.Bundle)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1 View (android.view.View)1 TextView (android.widget.TextView)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 Category (org.liberty.android.fantastischmemo.entity.Category)1