예제 #1
0
 private MachineConfiguration createMachineConfiguration(Collection<Class<?>> testClasses) {
   MachineConfiguration machineConfiguration = new MachineConfiguration();
   for (Class<?> testClass : testClasses) {
     GraphWalker annotation = testClass.getAnnotation(GraphWalker.class);
     if (isTestIncluded(annotation, testClass.getName())) {
       ContextConfiguration contextConfiguration = new ContextConfiguration();
       contextConfiguration.setTestClass(testClass);
       machineConfiguration.addContextConfiguration(contextConfiguration);
     }
   }
   return machineConfiguration;
 }
예제 #2
0
 private Collection<Context> createContexts(MachineConfiguration machineConfiguration) {
   Set<Context> contexts = new HashSet<>();
   for (ContextConfiguration contextConfiguration :
       machineConfiguration.getContextConfigurations()) {
     Context context = createContext(contextConfiguration.getTestClass());
     configureContext(context);
     contexts.add(context);
   }
   return contexts;
 }