/** * Create a new {@link AbstractApplicationContextRunner} instance. * @param contextFactory the factory used to create the actual context */ protected AbstractApplicationContextRunner(Supplier<C> contextFactory) { this(contextFactory, Collections.emptyList(), TestPropertyValues.empty(), TestPropertyValues.empty(), null, null, Collections.emptyList()); }
/** * Return a new {@link TestPropertyValues} with the underlying map populated with the * given property pairs. Name-value pairs can be specified with colon (":") or equals * ("=") separators. * @param pairs the name-value pairs for properties that need to be added to the * environment * @return the new instance */ public static TestPropertyValues of(Stream<String> pairs) { if (pairs == null) { return empty(); } return empty().and(pairs.map(Pair::parse)); }
/** * Return a new {@link TestPropertyValues} with the underlying map populated with the * given property pairs. Name-value pairs can be specified with colon (":") or equals * ("=") separators. * @param pairs the name-value pairs for properties that need to be added to the * environment * @return the new instance */ public static TestPropertyValues of(Iterable<String> pairs) { if (pairs == null) { return empty(); } return of(StreamSupport.stream(pairs.spliterator(), false)); }