Search in sources :

Example 1 with EngineFilter

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

the class DiscoveryRequestCreatorTests method convertsEngineOptions.

@Test
void convertsEngineOptions() {
    options.setScanClasspath(true);
    options.setIncludedEngines(asList("engine1", "engine2", "engine3"));
    options.setExcludedEngines(singletonList("engine2"));
    LauncherDiscoveryRequest request = convert();
    List<EngineFilter> engineFilters = request.getEngineFilters();
    assertThat(engineFilters).hasSize(2);
    assertThat(engineFilters.get(0).toString()).contains("includes", "[engine1, engine2, engine3]");
    assertThat(engineFilters.get(1).toString()).contains("excludes", "[engine2]");
}
Also used : LauncherDiscoveryRequest(org.junit.platform.launcher.LauncherDiscoveryRequest) EngineFilter(org.junit.platform.launcher.EngineFilter) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 EngineFilter (org.junit.platform.launcher.EngineFilter)1 LauncherDiscoveryRequest (org.junit.platform.launcher.LauncherDiscoveryRequest)1