Search in sources :

Example 6 with SummaryGeneratingListener

use of org.junit.platform.launcher.listeners.SummaryGeneratingListener in project junit5 by junit-team.

the class LauncherConfigurationParametersTests method getValueInExtensionContext.

@Test
void getValueInExtensionContext() {
    LauncherDiscoveryRequest request = // 
    LauncherDiscoveryRequestBuilder.request().configurationParameter("thing", // 
    "one else!").selectors(DiscoverySelectors.selectClass(Something.class)).build();
    SummaryGeneratingListener summary = new SummaryGeneratingListener();
    LauncherFactory.create().execute(request, summary);
    assertEquals(0, summary.getSummary().getTestsFailedCount());
}
Also used : LauncherDiscoveryRequest(org.junit.platform.launcher.LauncherDiscoveryRequest) SummaryGeneratingListener(org.junit.platform.launcher.listeners.SummaryGeneratingListener) Test(org.junit.jupiter.api.Test)

Aggregations

SummaryGeneratingListener (org.junit.platform.launcher.listeners.SummaryGeneratingListener)6 LauncherDiscoveryRequest (org.junit.platform.launcher.LauncherDiscoveryRequest)4 Launcher (org.junit.platform.launcher.Launcher)3 Test (org.junit.jupiter.api.Test)2 PrintWriter (java.io.PrintWriter)1 TestEngineSpy (org.junit.platform.engine.test.TestEngineSpy)1 TestExecutionListener (org.junit.platform.launcher.TestExecutionListener)1 TestPlan (org.junit.platform.launcher.TestPlan)1 TestExecutionSummary (org.junit.platform.launcher.listeners.TestExecutionSummary)1