use of org.junit.platform.engine.ConfigurationParameters in project junit5 by junit-team.
the class DefaultLauncherTests method withoutConfigurationParameters_launcherPassesEmptyConfigurationParametersIntoTheExecutionRequest.
@Test
void withoutConfigurationParameters_launcherPassesEmptyConfigurationParametersIntoTheExecutionRequest() {
TestEngineSpy engine = new TestEngineSpy();
DefaultLauncher launcher = createLauncher(engine);
launcher.execute(request().build());
ConfigurationParameters configurationParameters = engine.requestForExecution.getConfigurationParameters();
assertThat(configurationParameters.get("key").isPresent()).isFalse();
assertThat(configurationParameters.size()).isEqualTo(0);
}
use of org.junit.platform.engine.ConfigurationParameters in project junit5 by junit-team.
the class LauncherConfigurationParametersTests method configFile.
@Test
void configFile() {
ConfigurationParameters configParams = fromMap(emptyMap(), CONFIG_FILE_NAME);
assertThat(configParams.get(KEY)).contains(CONFIG_FILE);
assertThat(configParams.toString()).contains(CONFIG_FILE);
}
use of org.junit.platform.engine.ConfigurationParameters in project junit5 by junit-team.
the class LauncherConfigurationParametersTests method explicitConfigParam.
@Test
void explicitConfigParam() {
ConfigurationParameters configParams = fromMap(singletonMap(KEY, CONFIG_PARAM));
assertThat(configParams.get(KEY)).contains(CONFIG_PARAM);
assertThat(configParams.toString()).contains(CONFIG_PARAM);
}
use of org.junit.platform.engine.ConfigurationParameters in project junit5 by junit-team.
the class LauncherConfigurationParametersTests method systemPropertyOverridesConfigFile.
@Test
void systemPropertyOverridesConfigFile() {
System.setProperty(KEY, SYSTEM_PROPERTY);
ConfigurationParameters configParams = fromMap(emptyMap(), CONFIG_FILE_NAME);
assertThat(configParams.get(KEY)).contains(SYSTEM_PROPERTY);
assertThat(configParams.toString()).contains(CONFIG_FILE);
}
use of org.junit.platform.engine.ConfigurationParameters in project junit5 by junit-team.
the class LauncherConfigurationParametersTests method explicitConfigParamOverridesConfigFile.
@Test
void explicitConfigParamOverridesConfigFile() {
ConfigurationParameters configParams = fromMap(singletonMap(KEY, CONFIG_PARAM), CONFIG_FILE_NAME);
assertThat(configParams.get(KEY)).contains(CONFIG_PARAM);
assertThat(configParams.toString()).contains(CONFIG_PARAM);
assertThat(configParams.toString()).doesNotContain(CONFIG_FILE);
}
Aggregations