Search in sources :

Example 1 with CardImageGetter

use of org.liberty.android.fantastischmemo.ui.CardImageGetter 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

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