use of org.liberty.android.fantastischmemo.utils.AMPrefUtil in project AnyMemo by helloworld1.
the class AMPrefUtilTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
amPrefUtil = new AMPrefUtil(getContext());
}
use of org.liberty.android.fantastischmemo.utils.AMPrefUtil in project AnyMemo by helloworld1.
the class CardTextUtilTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
mockOption = Mockito.mock(Option.class);
Mockito.when(mockOption.getEnableArabicEngine()).thenReturn(false);
appComponents = Mockito.mock(AppComponents.class);
Mockito.when(appComponents.applicationContext()).thenReturn(getContext());
Mockito.when(appComponents.amFileUtil()).thenReturn(new AMFileUtil(getContext(), new AMPrefUtil(getContext())));
}
use of org.liberty.android.fantastischmemo.utils.AMPrefUtil in project AnyMemo by helloworld1.
the class AbstractConverterTest method setUp.
@Before
public void setUp() throws Exception {
// Set up necessary dependencies first
amFileUtil = new AMFileUtil(getTargetContext(), new AMPrefUtil(getTargetContext()));
converter = getConverter();
String srcFileName = getFileNamePrefix() + "." + converter.getSrcExtension();
srcFilePath = "/sdcard/" + getFileNamePrefix() + "." + converter.getSrcExtension();
destFilePath = "/sdcard/" + getFileNamePrefix() + "." + converter.getDestExtension();
// This amFileUtil is used on the test package so it can copy the
// asset file from the test package.
AMFileUtil amFileUtilForTest = new AMFileUtil(getContext(), new AMPrefUtil(getContext()));
amFileUtilForTest.copyFileFromAsset(srcFileName, new File(srcFilePath));
}
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);
}
use of org.liberty.android.fantastischmemo.utils.AMPrefUtil in project AnyMemo by helloworld1.
the class CardImageGetterTest method setUp.
@Before
public void setUp() {
Display display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
screenWidth = display.getWidth();
AppComponents appComponents = Mockito.mock(AppComponents.class);
Mockito.when(appComponents.applicationContext()).thenReturn(getContext());
Mockito.when(appComponents.amFileUtil()).thenReturn(new AMFileUtil(getContext(), new AMPrefUtil(getContext())));
cardImageGetter = new CardImageGetter(appComponents, imageSearchPaths);
}
Aggregations