@Test public void shouldConfigureAllClasses() { Collection<String> classNames = asList(ResourceA.class.getName()); new DynamicWebAppBootstrap(classNames).configure(registry); verify(registry).deepRegister(ResourceA.class); }
public void configure(ComponentRegistry registry) { for (String className : classNames) { logger.trace("Registering class {}", className); try { Class<?> clazz = Class.forName(className); registry.deepRegister(clazz); } catch (ClassNotFoundException e) { throw new ScannerException("Error while registering classes", e); } } }
DynamicWebAppBootstrap implements WebAppBootstrap { public void configure(ComponentRegistry registry) { for (String className : classNames) { logger.trace("Registering class {}", className); try { Class<?> clazz = Class.forName(className); registry.deepRegister(clazz); } catch (ClassNotFoundException e) { throw new ScannerException("Error while registering classes", e); } } } }
DynamicWebAppBootstrap implements WebAppBootstrap { public void configure(ComponentRegistry registry) { for (String className : classNames) { logger.trace("Registering class {}", className); try { Class<?> clazz = Class.forName(className); registry.deepRegister(clazz); } catch (ClassNotFoundException e) { throw new ScannerException("Error while registering classes", e); } } } DynamicWebAppBootstrap(Collection<String> classNames); }
DynamicWebAppBootstrap implements WebAppBootstrap { public void configure(ComponentRegistry registry) { for (String className : classNames) { logger.trace("Registering class {}", className); try { Class<?> clazz = Class.forName(className); registry.deepRegister(clazz); } catch (ClassNotFoundException e) { throw new ScannerException("Error while registering classes", e); } } } DynamicWebAppBootstrap(Collection<String> classNames); void configure(ComponentRegistry registry); }
DynamicWebAppBootstrap implements WebAppBootstrap { public void configure(ComponentRegistry registry) { for (String className : classNames) { logger.trace("Registering class {}", className); try { Class<?> clazz = Class.forName(className); registry.deepRegister(clazz); } catch (ClassNotFoundException e) { throw new ScannerException("Error while registering classes", e); } } } DynamicWebAppBootstrap(Collection<String> classNames); void configure(ComponentRegistry registry);  }