Skip to content

Commit

Permalink
Remove deprecated method
Browse files Browse the repository at this point in the history
These methods were supposed to be removed in older versions of Robolectric
  • Loading branch information
MGaetan89 committed Mar 14, 2024
1 parent a13a8db commit 71832ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 189 deletions.
152 changes: 0 additions & 152 deletions robolectric/src/main/java/org/robolectric/ConfigMerger.java

This file was deleted.

Expand Up @@ -62,7 +62,11 @@
@SuppressWarnings("NewApi")
public class RobolectricTestRunner extends SandboxTestRunner {

public static final String CONFIG_PROPERTIES = "robolectric.properties";
/**
* @deprecated No longer used. This constant will be removed in a future version of Robolectric.
*/
@Deprecated public static final String CONFIG_PROPERTIES = "robolectric.properties";

private static final Injector DEFAULT_INJECTOR = defaultInjector().build();
private static final Map<ManifestIdentifier, AndroidManifest> appManifestsCache = new HashMap<>();

Expand Down Expand Up @@ -106,7 +110,7 @@ protected RobolectricTestRunner(final Class<?> testClass, Injector injector)
super(testClass, injector);

if (DeprecatedTestRunnerDefaultConfigProvider.globalConfig == null) {
DeprecatedTestRunnerDefaultConfigProvider.globalConfig = buildGlobalConfig();
DeprecatedTestRunnerDefaultConfigProvider.globalConfig = new Config.Builder().build();
}

this.sandboxManager = injector.getInstance(SandboxManager.class);
Expand Down Expand Up @@ -415,30 +419,6 @@ private Configuration getConfiguration(Method method) {
return configurationStrategy.getConfig(getTestClass().getJavaClass(), method);
}

/**
* Provides the base Robolectric configuration {@link Config} used for all tests.
*
* <p>Configuration provided for specific packages, test classes, and test method configurations
* will override values provided here.
*
* <p>Custom TestRunner subclasses may wish to override this method to provide alternate
* configuration. Consider using a {@link Config.Builder}.
*
* <p>The default implementation has appropriate values for most use cases.
*
* @return global {@link Config} object
* @deprecated Provide a service implementation of {@link GlobalConfigProvider} instead. This
* method will be removed in Robolectric 4.3.
* @since 3.1.3
* @see <a href="http://robolectric.org/migrating/#migrating-to-40">Migration Notes</a> for more
* details.
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
protected Config buildGlobalConfig() {
return new Config.Builder().build();
}

@AutoService(GlobalConfigProvider.class)
@Priority(Integer.MIN_VALUE)
@Deprecated
Expand Down
Expand Up @@ -91,15 +91,4 @@ public ServiceController<T> unbind() {
shadowMainLooper.idleIfPaused();
return this;
}

/**
* @deprecated Use the appropriate builder in {@link org.robolectric.Robolectric} instead.
*
* This method will be removed in Robolectric 3.6.
*/
@Deprecated
public ServiceController<T> withIntent(Intent intent) {
this.intent = intent;
return this;
}
}

0 comments on commit 71832ba

Please sign in to comment.