PlatformTestStorageRegistry


@ExperimentalTestApi
public final class PlatformTestStorageRegistry


An exposed registry instance that holds a reference to an PlatformTestStorage instance.

PlatformTestStorage and PlatformTestStorageRegistry are low level APIs, typically used by higher level test frameworks. It is generally not recommended for direct use by most tests.

This API is experimental and is subject to change or removal in future releases.

Summary

Public methods

synchronized static PlatformTestStorage

Returns the registered PlatformTestStorage instance.

synchronized static void

Registers a new PlatformTestStorage instance.

Public methods

getInstance

synchronized public static PlatformTestStorage getInstance()

Returns the registered PlatformTestStorage instance.

This method returns the instance last registered by the registerInstance method, or the default instance if none is ever registered.

registerInstance

synchronized public static void registerInstance(PlatformTestStorage instance)

Registers a new PlatformTestStorage instance. This will override any previously set instance.

Parameters
PlatformTestStorage instance

the instance to be registered. Cannot be null.