TestDescriptor getTestDescriptorFor(TestEngine testEngine) {
   // @formatter:off
   return getChildren()
       .stream()
       .map(EngineAwareTestDescriptor.class::cast)
       .filter(testDescriptor -> Objects.equals(testEngine, testDescriptor.getEngine()))
       .findAny()
       .orElseThrow(
           () ->
               new IllegalArgumentException(
                   "No TestDescriptor for TestEngine with ID: " + testEngine.getId()));
   // @formatter:on
 }
Beispiel #2
0
 private RootTestDescriptor discoverRootDescriptor(
     TestPlanSpecification specification, String phase) {
   RootTestDescriptor root = new RootTestDescriptor();
   for (TestEngine testEngine : testEngineRegistry.getTestEngines()) {
     LOG.fine(
         () ->
             String.format(
                 "Discovering tests during launcher %s phase in engine '%s'.",
                 phase, testEngine.getId()));
     EngineAwareTestDescriptor engineRoot = testEngine.discoverTests(specification);
     root.addChild(engineRoot);
   }
   root.applyFilters(specification);
   root.prune();
   return root;
 }