Search in sources :

Example 1 with SelectUris

use of org.junit.platform.suite.api.SelectUris in project junit5 by junit-team.

the class SuiteLauncherDiscoveryRequestBuilderTests method selectUris.

@Test
void selectUris() {
    @SelectUris("path/to/root")
    class Suite {
    }
    LauncherDiscoveryRequest request = builder.suite(Suite.class).build();
    List<UriSelector> selectors = request.getSelectorsByType(UriSelector.class);
    assertEquals(URI.create("path/to/root"), exactlyOne(selectors).getUri());
}
Also used : LauncherDiscoveryRequest(org.junit.platform.launcher.LauncherDiscoveryRequest) SelectUris(org.junit.platform.suite.api.SelectUris) UriSelector(org.junit.platform.engine.discovery.UriSelector) Test(org.junit.jupiter.api.Test)

Example 2 with SelectUris

use of org.junit.platform.suite.api.SelectUris in project junit5 by junit-team.

the class SuiteLauncherDiscoveryRequestBuilderTests method selectUrisFiltersEmptyUris.

@Test
void selectUrisFiltersEmptyUris() {
    @SelectUris("")
    class Suite {
    }
    LauncherDiscoveryRequest request = builder.suite(Suite.class).build();
    assertTrue(request.getSelectorsByType(UriSelector.class).isEmpty());
}
Also used : LauncherDiscoveryRequest(org.junit.platform.launcher.LauncherDiscoveryRequest) SelectUris(org.junit.platform.suite.api.SelectUris) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)2 LauncherDiscoveryRequest (org.junit.platform.launcher.LauncherDiscoveryRequest)2 SelectUris (org.junit.platform.suite.api.SelectUris)2 UriSelector (org.junit.platform.engine.discovery.UriSelector)1