/** * Create a {@link StartTests} runnable with the * specified options. * * @param optionsByType the {@link OptionsByType}s to use */ public StartTests(OptionsByType optionsByType) { List<Option> list = new ArrayList<>(); Iterable<Serializable> serializables = optionsByType.getInstancesOf(Serializable.class); serializables.forEach((opt) -> list.add(opt instanceof Option ? (Option) opt : Decoration.of(opt))); this.options = list.toArray(new Option[list.size()]); }
/** * Create a {@link StartTests} runnable with the * specified options. * * @param optionsByType the {@link OptionsByType}s to use */ public StartTests(OptionsByType optionsByType) { List<Option> list = new ArrayList<>(); Iterable<Serializable> serializables = optionsByType.getInstancesOf(Serializable.class); serializables.forEach((opt) -> list.add(opt instanceof Option ? (Option) opt : Decoration.of(opt))); this.options = list.toArray(new Option[list.size()]); }
/** * Create a {@link SimpleJUnitTestRun} application. * * @param platform the {@link Platform} on which the {@link Application} was launched * @param process the underlying {@link ApplicationProcess} representing the {@link Application} * @param optionsByType the {@link OptionsByType} used to launch the {@link Application} */ public SimpleJUnitTestRun(Platform platform, JavaApplicationProcess process, OptionsByType optionsByType) { super(platform, process, optionsByType); runListeners = new ArrayList<>(); // Add any listeners from the options for (JUnitTestListener listener : optionsByType.getInstancesOf(JUnitTestListener.class)) { runListeners.add(listener); } addListener(new EventListener(), JUnitTestRunner.STREAM_NAME); }
/** * Create a {@link SimpleJUnitTestRun} application. * * @param platform the {@link Platform} on which the {@link Application} was launched * @param process the underlying {@link ApplicationProcess} representing the {@link Application} * @param optionsByType the {@link OptionsByType} used to launch the {@link Application} */ public SimpleJUnitTestRun(Platform platform, JavaApplicationProcess process, OptionsByType optionsByType) { super(platform, process, optionsByType); runListeners = new ArrayList<>(); // Add any listeners from the options for (JUnitTestListener listener : optionsByType.getInstancesOf(JUnitTestListener.class)) { runListeners.add(listener); } addListener(new EventListener(), JUnitTestRunner.STREAM_NAME); }
Iterable<ResolveHandler> handlers = argOptions.getInstancesOf(ResolveHandler.class);
Iterable<ResolveHandler> handlers = argOptions.getInstancesOf(ResolveHandler.class);
propertyOptions.getInstancesOf(SystemProperty.ResolveHandler.class);
propertyOptions.getInstancesOf(SystemProperty.ResolveHandler.class);
for (Profile profile : getOptions().getInstancesOf(Profile.class)) for (ApplicationListener listener : getOptions().getInstancesOf(ApplicationListener.class)) for (ApplicationListener listener : getOptions().getInstancesOf(ApplicationListener.class))
for (JvmOption jvmOption : optionsByType.getInstancesOf(JvmOption.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
for (Profile profile : getOptions().getInstancesOf(Profile.class)) for (ApplicationListener listener : getOptions().getInstancesOf(ApplicationListener.class)) for (ApplicationListener listener : getOptions().getInstancesOf(ApplicationListener.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Option option : launchOptions.getInstancesOf(Option.class)) for (JvmOption jvmOption : launchOptions.getInstancesOf(JvmOption.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Option option : launchOptions.getInstancesOf(Option.class)) for (JvmOption jvmOption : launchOptions.getInstancesOf(JvmOption.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (Profile profile : launchOptions.getInstancesOf(Profile.class)) for (ApplicationListener listener : launchOptions.getInstancesOf(ApplicationListener.class))
jUnitCore.addListener(listener); for (RunListener runListener : optionsByType.getInstancesOf(RunListener.class))
jUnitCore.addListener(listener); for (RunListener runListener : optionsByType.getInstancesOf(RunListener.class))