use of com.android.tools.idea.diagnostics.crash.CrashReporter in project android by JetBrains.
the class RenderTaskTest method testCrashReport.
public void testCrashReport() throws Exception {
VirtualFile layoutFile = myFixture.copyFileToProject("xmlpull/simple.xml", "res/layout/foo.xml");
Configuration configuration = getConfiguration(layoutFile, DEFAULT_DEVICE_ID);
RenderLogger logger = mock(RenderLogger.class);
doThrow(new NullPointerException()).when(logger).warning(eq("resources.resolve.theme"), anyString(), any());
CrashReporter mockCrashReporter = mock(CrashReporter.class);
RenderTask task = createRenderTask(layoutFile, configuration, logger);
task.setCrashReporter(mockCrashReporter);
task.render();
verify(mockCrashReporter, times(1)).submit(isNotNull(CrashReport.class));
}
Aggregations