Search in sources :

Example 1 with Builder

use of org.robolectric.internal.bytecode.InstrumentationConfiguration.Builder in project robolectric by robolectric.

the class RobolectricTestRunner method createClassLoaderConfig.

/**
   * Create an {@link InstrumentationConfiguration} suitable for the provided {@link Config}.
   *
   * Custom TestRunner subclasses may wish to override this method to provide alternate configuration.
   *
   * @param config the merged configuration for the test that's about to run -- todo
   * @return an {@link InstrumentationConfiguration}
   * @deprecated Override {@link #createClassLoaderConfig(FrameworkMethod)} instead
   */
@Deprecated
@NotNull
public InstrumentationConfiguration createClassLoaderConfig(Config config) {
    FrameworkMethod method = ((MethodPassThrough) config).method;
    Builder builder = new InstrumentationConfiguration.Builder(super.createClassLoaderConfig(method));
    AndroidConfigurer.configure(builder, getInterceptors());
    AndroidConfigurer.withConfig(builder, config);
    return builder.build();
}
Also used : Builder(org.robolectric.internal.bytecode.InstrumentationConfiguration.Builder) FrameworkMethod(org.junit.runners.model.FrameworkMethod) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

NotNull (org.jetbrains.annotations.NotNull)1 FrameworkMethod (org.junit.runners.model.FrameworkMethod)1 Builder (org.robolectric.internal.bytecode.InstrumentationConfiguration.Builder)1