Search in sources :

Example 1 with AppComponents

use of org.liberty.android.fantastischmemo.modules.AppComponents 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())));
}
Also used : AMFileUtil(org.liberty.android.fantastischmemo.utils.AMFileUtil) AppComponents(org.liberty.android.fantastischmemo.modules.AppComponents) Option(org.liberty.android.fantastischmemo.entity.Option) AMPrefUtil(org.liberty.android.fantastischmemo.utils.AMPrefUtil)

Example 2 with AppComponents

use of org.liberty.android.fantastischmemo.modules.AppComponents 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);
}
Also used : AMFileUtil(org.liberty.android.fantastischmemo.utils.AMFileUtil) AppComponents(org.liberty.android.fantastischmemo.modules.AppComponents) CardImageGetter(org.liberty.android.fantastischmemo.ui.CardImageGetter) Display(android.view.Display) WindowManager(android.view.WindowManager) AMPrefUtil(org.liberty.android.fantastischmemo.utils.AMPrefUtil) Before(org.junit.Before)

Aggregations

AppComponents (org.liberty.android.fantastischmemo.modules.AppComponents)2 AMFileUtil (org.liberty.android.fantastischmemo.utils.AMFileUtil)2 AMPrefUtil (org.liberty.android.fantastischmemo.utils.AMPrefUtil)2 Display (android.view.Display)1 WindowManager (android.view.WindowManager)1 Before (org.junit.Before)1 Option (org.liberty.android.fantastischmemo.entity.Option)1 CardImageGetter (org.liberty.android.fantastischmemo.ui.CardImageGetter)1