Search in sources :

Example 91 with Application

use of android.app.Application in project robospice by stephanenicolas.

the class InFileWeatherPersisterTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    Application application = (Application) getContext().getApplicationContext();
    GsonObjectPersisterFactory factory = new GsonObjectPersisterFactory(application);
    dataPersistenceManager = factory.createObjectPersister(WeatherResult.class);
}
Also used : WeatherResult(com.octo.android.robospice.springandroid.test.model.json.WeatherResult) Application(android.app.Application)

Example 92 with Application

use of android.app.Application in project robospice by stephanenicolas.

the class InFileStringObjectPersisterTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    Application application = (Application) getContext().getApplicationContext();
    inFileStringObjectPersister = new InFileStringObjectPersister(application);
}
Also used : Application(android.app.Application)

Example 93 with Application

use of android.app.Application in project robospice by stephanenicolas.

the class InFileInputStreamObjectPersisterTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    Application application = (Application) getContext().getApplicationContext();
    inputStreamCacheManager = new InFileInputStreamObjectPersister(application);
}
Also used : Application(android.app.Application)

Example 94 with Application

use of android.app.Application in project robospice by stephanenicolas.

the class InFileObjectPersisterFactoryTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    Application application = (Application) getContext().getApplicationContext();
    inFileObjectPersisterFactory = new InFileObjectPersisterFactoryUnderTest(application);
}
Also used : Application(android.app.Application)

Example 95 with Application

use of android.app.Application in project robospice by stephanenicolas.

the class InFileObjectPersisterWithSanitationTest method setUp.

@Override
protected void setUp() throws Exception {
    Application application = (Application) getContext().getApplicationContext();
    inFileObjectPersister = new InFileObjectPersisterWithSanitationUnderTest(application);
    super.setUp(inFileObjectPersister);
}
Also used : Application(android.app.Application)

Aggregations

Application (android.app.Application)123 Test (org.junit.Test)26 Context (android.content.Context)24 Activity (android.app.Activity)22 ApplicationInfo (android.content.pm.ApplicationInfo)12 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)11 File (java.io.File)10 MvpPresenter (com.hannesdorfmann.mosby3.mvp.MvpPresenter)8 Before (org.junit.Before)8 MvpView (com.hannesdorfmann.mosby3.mvp.MvpView)7 ShadowApplication (org.robolectric.shadows.ShadowApplication)7 NameNotFoundException (android.content.pm.PackageManager.NameNotFoundException)6 PrintWriter (java.io.PrintWriter)6 Date (java.util.Date)6 PackageInfo (android.content.pm.PackageInfo)5 PackageManager (android.content.pm.PackageManager)5 RemoteException (android.os.RemoteException)5 AbsoluteSizeSpan (android.text.style.AbsoluteSizeSpan)5 BackgroundColorSpan (android.text.style.BackgroundColorSpan)5 CharacterStyle (android.text.style.CharacterStyle)5