@Override public boolean isTransactionHandlingDefinedOnMethodLevel(TestEvent testEvent) { return testEvent.getTestMethod().isAnnotationPresent(Transactional.class); }
public CleanupData(TestEvent testEvent, BuiltInCleanupStrategy cleanupStrategy) { super(testEvent.getTestInstance(), testEvent.getTestMethod()); this.cleanupStrategy = cleanupStrategy; } }
public CleanupData(TestEvent testEvent, CleanupStrategy cleanupStrategy) { super(testEvent.getTestInstance(), testEvent.getTestMethod()); this.cleanupStrategy = cleanupStrategy; }
@Override public boolean isTransactionHandlingDefinedOnMethodLevel(TestEvent testEvent) { return shouldWrapTestMethodInTransaction(testEvent.getTestMethod()); }
public CleanupData(TestEvent testEvent, CleanupStrategy cleanupStrategy) { super(testEvent.getTestInstance(), testEvent.getTestMethod()); this.cleanupStrategy = cleanupStrategy; }
@Override public TransactionMode getTransactionModeFromMethodLevel(TestEvent testEvent) { return testEvent.getTestMethod().getAnnotation(Transactional.class).value(); } }
@Override public boolean isTransactionHandlingDefinedOnMethodLevel(TestEvent testEvent) { return shouldWrapTestMethodInTransaction(testEvent.getTestMethod()); }
public BusEvent(TestEvent event) { this.testInstance = event.getTestInstance(); this.testMethod = event.getTestMethod(); }
public AfterPersistenceTest(TestEvent testEvent) { super(testEvent.getTestInstance(), testEvent.getTestMethod()); }
public BeforePersistenceTest(TestEvent testEvent) { super(testEvent.getTestInstance(), testEvent.getTestMethod()); }
public AfterPersistenceTest(TestEvent testEvent) { super(testEvent.getTestInstance(), testEvent.getTestMethod()); }
private BlurLevel resolveBlurLevel(TestEvent event) { if (event.getTestMethod().getAnnotation(Blur.class) != null) { return event.getTestMethod().getAnnotation(Blur.class).value(); } else { Class<? extends TestClass> testClass = event.getTestClass().getClass(); Class<?> annotatedClass = ReflectionUtil.getClassWithAnnotation(testClass, Blur.class); BlurLevel blurLevel = null; if (annotatedClass != null) { blurLevel = annotatedClass .getAnnotation(Blur.class).value(); } return blurLevel; } }
private JpaCacheEviction obtainAnnotation(TestEvent event) { final JpaCacheEviction classLevel = event.getTestClass().getAnnotation(JpaCacheEviction.class); final JpaCacheEviction methodLevel = event.getTestMethod().getAnnotation(JpaCacheEviction.class); if (methodLevel != null) { return methodLevel; } return classLevel; }
private JpaCacheEviction obtainAnnotation(TestEvent event) { final JpaCacheEviction classLevel = event.getTestClass().getAnnotation(JpaCacheEviction.class); final JpaCacheEviction methodLevel = event.getTestMethod().getAnnotation(JpaCacheEviction.class); if (methodLevel != null) { return methodLevel; } return classLevel; }
private JpaCacheEviction obtainAnnotation(TestEvent event) { final JpaCacheEviction classLevel = event.getTestClass().getAnnotation(JpaCacheEviction.class); final JpaCacheEviction methodLevel = event.getTestMethod().getAnnotation(JpaCacheEviction.class); if (methodLevel != null) { return methodLevel; } return classLevel; }
protected StepEvent(final String featurePath, final Step step) { super(EventHelper.currentEvent().getTestInstance(), EventHelper.currentEvent().getTestMethod()); this.featurePath = featurePath; this.step = step; }
private void createContext(EventContext<? extends TestEvent> context) { try { lookup(context.getEvent().getTestMethod(), new Activate()); context.proceed(); } finally { lookup(context.getEvent().getTestMethod(), new DeActivate()); } }
private void createContext(EventContext<? extends TestEvent> context) { try { lookup(context.getEvent().getTestMethod(), new Activate()); context.proceed(); } finally { lookup(context.getEvent().getTestMethod(), new DeActivate()); } }
private static boolean shouldClientRun(Deployment deployment, Container container, TestEvent event) { if (isRunAsClient(deployment, event.getTestClass().getJavaClass(), event.getTestMethod())) { return true; } else if (isLocalContainer(container)) { return true; } return false; }
public boolean isClientMode(TestEvent testEvent) { boolean runAsClient = RunModeUtils.isRunAsClient(deployment, testEvent.getTestClass().getJavaClass(), testEvent.getTestMethod()); boolean isLocal = RunModeUtils.isLocalContainer(container); return runAsClient || isLocal; } }