@Override public Statement apply(Statement base, FrameworkMethod method, Object target) { initializeIfNecessary(method, target); return super.apply(base, method, target); }
@Override public Statement apply(Statement base, FrameworkMethod method, Object target) { initializeIfNecessary(method, target); return super.apply(base, method, target); }
@Override public Statement apply(Statement base, FrameworkMethod method, Object target) { try { RestTemplate client = new RestTemplate(); client.getForEntity(new UriTemplate(getUrl("/uaa/login", uaaPort)).toString(), String.class); client.getForEntity(new UriTemplate(getUrl("/api/index.html")).toString(), String.class); logger.debug("Basic connectivity test passed"); } catch (RestClientException e) { failTest(); } return super.apply(base, method, target); }
@Override public Statement apply(Statement base, FrameworkMethod method, Object target) { initializeIfNecessary(method, target); return super.apply(base, method, target); }
@Override public Statement apply(Statement base, FrameworkMethod method, Object target) { fixture = target; if (dataPopulator == null) { AnnotationConfiguration configuration = new AnnotationConfiguration(fixture.getClass()); dataPopulator = DataPopulatorFactory.INSTANCE.createDefaultDataPopulator(configuration); } return super.apply(base, method, target); }
@Override public Statement apply(Statement base, FrameworkMethod method, Object target) { TestContextManager contextManager = getTestContextManager(method.getMethod().getDeclaringClass()); try { contextManager.prepareTestInstance(target); } catch (Exception e) { throw new IllegalStateException("Could not instantiate test instance", e); } Statement statement = super.apply(base, method, target); statement = withBefores(method, target, statement, contextManager); statement = withAfters(method, target, statement, contextManager); return statement; }