Search in sources :

Example 1 with SimplePluginLoader

use of org.acra.plugins.SimplePluginLoader in project acra by ACRA.

the class ACRATest method failing.

@Test(expected = AssertionError.class)
public void failing() {
    Application application = ApplicationProvider.getApplicationContext();
    CoreConfigurationBuilder builder = new CoreConfigurationBuilder().withPluginLoader(new SimplePluginLoader(FailingTestAdministrator.class));
    ACRA.init(application, builder);
    ACRA.getErrorReporter().handleException(new RuntimeException());
}
Also used : CoreConfigurationBuilder(org.acra.config.CoreConfigurationBuilder) SimplePluginLoader(org.acra.plugins.SimplePluginLoader) Application(android.app.Application) Test(org.junit.Test)

Example 2 with SimplePluginLoader

use of org.acra.plugins.SimplePluginLoader in project acra by ACRA.

the class ACRATest method init.

@Test
public void init() {
    Application application = ApplicationProvider.getApplicationContext();
    CoreConfigurationBuilder builder = new CoreConfigurationBuilder().withPluginLoader(new SimplePluginLoader(StacktraceCollector.class, TestAdministrator.class));
    ACRA.init(application, builder);
    ACRA.getErrorReporter().handleException(new RuntimeException());
}
Also used : CoreConfigurationBuilder(org.acra.config.CoreConfigurationBuilder) SimplePluginLoader(org.acra.plugins.SimplePluginLoader) StacktraceCollector(org.acra.collector.StacktraceCollector) Application(android.app.Application) Test(org.junit.Test)

Aggregations

Application (android.app.Application)2 CoreConfigurationBuilder (org.acra.config.CoreConfigurationBuilder)2 SimplePluginLoader (org.acra.plugins.SimplePluginLoader)2 Test (org.junit.Test)2 StacktraceCollector (org.acra.collector.StacktraceCollector)1