public AbstractJUnitRunner(final Class<?> testClass) throws InitializationError { super(testClass); SessionUser runTestAs = testClass.getAnnotation(SessionUser.class); if (runTestAs != null) runAs = runTestAs.value(); SessionDb runTestDb = testClass.getAnnotation(SessionDb.class); if (runTestDb != null) db = runTestDb.value(); runLegacy = testClass.isAnnotationPresent(RunLegacy.class); }
protected String getDatabase(final FrameworkMethod method) { SessionDb runTestDb = method.getAnnotation(SessionDb.class); String ret = null; if (runTestDb != null) { ret = runTestDb.value(); } if (ret == null) { ret = db; } return ret; }