use of cn.taketoday.core.env.CommandLinePropertySource in project today-infrastructure by TAKETODAY.
the class ApplicationTests method commandLinePropertySource.
@Test
void commandLinePropertySource() {
Application application = new Application(ExampleConfig.class);
application.setApplicationType(ApplicationType.NONE_WEB);
ConfigurableEnvironment environment = new StandardEnvironment();
application.setEnvironment(environment);
this.context = application.run("--foo=bar");
assertThat(environment).has(matchingPropertySource(CommandLinePropertySource.class, "commandLineArgs"));
}
use of cn.taketoday.core.env.CommandLinePropertySource in project today-framework by TAKETODAY.
the class ApplicationTests method commandLinePropertySource.
@Test
void commandLinePropertySource() {
Application application = new Application(ExampleConfig.class);
application.setApplicationType(ApplicationType.NONE_WEB);
ConfigurableEnvironment environment = new StandardEnvironment();
application.setEnvironment(environment);
this.context = application.run("--foo=bar");
assertThat(environment).has(matchingPropertySource(CommandLinePropertySource.class, "commandLineArgs"));
}
Aggregations