@Override protected Object runReflectiveCall() throws Throwable { return createTest(method); } }.run();
/** * Returns a new fixture to run a particular test {@code method} against. * Default implementation executes the no-argument {@link #createTest()} method. * * @since 4.13 */ protected Object createTest(FrameworkMethod method) throws Exception { return createTest(); }
@Override protected Object runReflectiveCall() throws Throwable { return createTest(); } }.run();
protected Object getTestInstance() throws Exception { if ( testInstance == null ) { testInstance = super.createTest(); } return testInstance; }
@Override protected Object createTest() throws Exception { Object testObj = super.createTest(); injector.injectMembers(testObj); return testObj; } }
/** * Delegate to the parent implementation for creating the test instance and * then allow the {@link #getTestContextManager() TestContextManager} to * prepare the test instance before returning it. * @see TestContextManager#prepareTestInstance */ @Override protected Object createTest() throws Exception { Object testInstance = super.createTest(); getTestContextManager().prepareTestInstance(testInstance); return testInstance; }
@Override protected Object createTest() throws Exception { Object test = super.createTest(); injector.injectMembers(test); return test; }
@Override protected Object createTest() throws Exception { Object test = super.createTest(); injector.injectMembers(test); return test; } }
@Override protected Object createTest() throws Exception { Object test = super.createTest(); configureTest(test); return test; }
@Override protected Object createTest() throws Exception { Object test = super.createTest(); Class<? extends Object> c = test.getClass(); set(test, c, "port", port); set(test, c, "securePort", securePort); return test; }
testInstance = super.createTest(); } catch (Exception ex) { throw new RuntimeException(ex);
testInstance = super.createTest();
@Override protected Object runReflectiveCall() throws Throwable { return createTest(); } }.run();
/** * Creates an instance of the current test class. When using a probe invoker, this simply * delegates to super. Otherwise, we perform injection on the instance created by the super * method. * <p> * In this case, an {@link InjectorFactory} is obtained via SPI lookup. */ @Override protected Object createTest() throws Exception { Object test = super.createTest(); manager.inject(test); return test; } }
@Override protected Object createTest() throws Exception { Object test = super.createTest(); Mockomatic mockomatic = new Mockomatic(mockeryOf(test)); mockomatic.fillIn(test); return test; }
@Override protected Object createTest() throws Exception { Object test = super.createTest(); setTestName(test, currentMethod); setTestMethod(test, currentMethod); return test; }
@Override public Object createTest() throws Exception { Object test = super.createTest(); if (!(test instanceof FriendTestCase)) { throw new IllegalStateException("MultiBrowserRunner cannot be used for test that does not implement FriendTestCase." + " test class: " + test.getClass().getName()); } String baseUrl = launchServer ? Launcher.getProvider().getBaseUrl() : ConfigurationProperties.getServerUrl(); ((FriendTestCase) test).initFriendTestCase(driver, baseUrl); return test; }
/** * Returns a new fixture for running a test. Default implementation executes * the test class's no-argument constructor (validation should have ensured * one exists). */ @Override protected Object createTest() throws Exception { ManifestTest instance = (ManifestTest) super.createTest(); instance.setManifestItem(manifestItem); return instance; }
@Override protected Object createTest() throws Exception { PlatformTestCase testCase = (PlatformTestCase) super.createTest(); testCase.installPlatform( testPlatform ); return testCase; } };
@Override protected Object createTest() throws Exception { Object test = super.createTest(); try { PageFactory.initElements(new WebDriverExtensionFieldDecorator(WebDriverExtensionsContext.getDriver()), test); } catch (WebDriverExtensionException e) { // Swallow "WebDriverExtensionsContext is not set" exceptions to allow running normal JUnit tests } return test; }