use of testapp.util.InvokeLog in project actframework by actframework.
the class ControllerEnhancerTest method setup.
@Before
public void setup() throws Exception {
super.setup();
invokeLog = mock(InvokeLog.class);
scanner = new ControllerByteCodeScanner();
scanner.setApp(mockApp);
eventBus = mock(EventBus.class);
classLoader = new TestingAppClassLoader(mockApp);
classInfoRepository = mock(ClassInfoRepository.class);
$.setProperty(classLoader, classInfoRepository, "classInfoRepository");
infoSrc = classLoader.controllerClassMetaInfoManager();
scannerManager = mock(AppCodeScannerManager.class);
when(mockApp.classLoader()).thenReturn(classLoader);
when(mockApp.scannerManager()).thenReturn(scannerManager);
when(mockApp.eventBus()).thenReturn(eventBus);
when(mockAppConfig.possibleControllerClass(anyString())).thenReturn(true);
when(mockRouter.isActionMethod(anyString(), anyString())).thenReturn(false);
C.List<AppByteCodeScanner> scanners = C.list(scanner);
when(scannerManager.byteCodeScanners()).thenReturn(scanners);
InvokeLogFactory.set(invokeLog);
ActionContext.clearCurrent();
ctx = ActionContext.create(mockApp, mockReq, mockResp);
ctx.saveLocal();
base = new File("./target/test-classes");
}
use of testapp.util.InvokeLog in project actframework by actframework.
the class MailerEnhancerTest method setup.
@Before
public void setup() throws Exception {
super.setup();
invokeLog = mock(InvokeLog.class);
scanner = new MailerByteCodeScanner();
scanner.setApp(mockApp);
classLoader = new TestingAppClassLoader(mockApp);
infoSrc = classLoader.mailerClassMetaInfoManager();
scannerManager = mock(AppCodeScannerManager.class);
when(mockApp.classLoader()).thenReturn(classLoader);
when(mockApp.scannerManager()).thenReturn(scannerManager);
C.List<AppByteCodeScanner> scanners = C.list(scanner);
when(scannerManager.byteCodeScanners()).thenReturn(scanners);
InvokeLogFactory.set(invokeLog);
base = new File("./target/test-classes");
}
Aggregations