use of act.job.bytecode.JobByteCodeScanner in project actframework by actframework.
the class App method loadBuiltInScanners.
private void loadBuiltInScanners() {
scannerManager.register(new GenieModuleScanner());
scannerManager.register(new ClassInfoByteCodeScanner());
scannerManager.register(new ClassFinderByteCodeScanner());
scannerManager.register(new ControllerByteCodeScanner());
scannerManager.register(new MailerByteCodeScanner());
scannerManager.register(new JobByteCodeScanner());
scannerManager.register(new Password.ByteCodeScanner());
scannerManager.register(new SimpleBean.ByteCodeScanner());
scannerManager.register(new SimpleEventListenerByteCodeScanner());
scannerManager.register(new CommanderByteCodeScanner());
scannerManager.register(new EntityInfoByteCodeScanner());
scannerManager.register(new RythmTransformerScanner());
scannerManager.register(new MetricContextScanner());
scannerManager.register(new ImplicitVariableProvider.TemplateVariableScanner(this));
scannerManager.register(new ConfigurationByteCodeScanner());
}
use of act.job.bytecode.JobByteCodeScanner in project actframework by actframework.
the class ControllerByteCodeScannerTest method setup.
@Before
public void setup() throws Exception {
super.setup();
controllerScanner = new ControllerByteCodeScanner();
jobScanner = new JobByteCodeScanner();
scannerManager = mock(AppCodeScannerManager.class);
classInfoRepository = mock(ClassInfoRepository.class);
eventBus = mock(EventBus.class);
when(mockApp.eventBus()).thenReturn(eventBus);
jobManager = new JobManager(mockApp);
classLoader = new TestingAppClassLoader(mockApp);
$.setProperty(classLoader, classInfoRepository, "classInfoRepository");
when(mockApp.classLoader()).thenReturn(classLoader);
infoSrc = classLoader.controllerClassMetaInfoManager();
when(mockApp.classLoader()).thenReturn(classLoader);
when(mockApp.scannerManager()).thenReturn(scannerManager);
when(mockApp.jobManager()).thenReturn(jobManager);
when(mockAppConfig.possibleControllerClass(anyString())).thenReturn(true);
when(mockRouter.isActionMethod(anyString(), anyString())).thenReturn(false);
C.List<AppByteCodeScanner> scanners = $.cast(C.listOf(controllerScanner, jobScanner));
// C.List<AppByteCodeScanner> scanners = C.list(controllerScanner);
when(scannerManager.byteCodeScanners()).thenReturn(scanners);
paramValueLoaderManager = mock(ParamValueLoaderManager.class);
when(mockApp.service(ParamValueLoaderManager.class)).thenReturn(paramValueLoaderManager);
controllerScanner.setApp(mockApp);
jobScanner.setApp(mockApp);
base = new File("./target/test-classes");
}
Aggregations