Search in sources :

Example 1 with MethodOrderer

use of org.junit.jupiter.api.MethodOrderer in project junit5 by junit-team.

the class DefaultJupiterConfigurationTests method shouldGetNothingAsDefaultTestMethodOrderWithoutConfigParamSet.

@Test
void shouldGetNothingAsDefaultTestMethodOrderWithoutConfigParamSet() {
    ConfigurationParameters parameters = mock(ConfigurationParameters.class);
    String key = Constants.DEFAULT_TEST_METHOD_ORDER_PROPERTY_NAME;
    when(parameters.get(key)).thenReturn(Optional.empty());
    JupiterConfiguration configuration = new DefaultJupiterConfiguration(parameters);
    final Optional<MethodOrderer> defaultTestMethodOrder = configuration.getDefaultTestMethodOrderer();
    assertThat(defaultTestMethodOrder).isEmpty();
}
Also used : MethodOrderer(org.junit.jupiter.api.MethodOrderer) ConfigurationParameters(org.junit.platform.engine.ConfigurationParameters) Test(org.junit.jupiter.api.Test)

Aggregations

MethodOrderer (org.junit.jupiter.api.MethodOrderer)1 Test (org.junit.jupiter.api.Test)1 ConfigurationParameters (org.junit.platform.engine.ConfigurationParameters)1