FakeRuntimeFactory


public final class FakeRuntimeFactory


Factory for creating test-only instances of Runtime.

Summary

Nested types

public static class FakeRuntimeFactory.Companion

Public constructors

Public methods

@NonNull FakeRuntime

Creates a Runtime instance

@NonNull Set<@NonNull Feature>

The set of features that this service requires.

static final boolean

Will be passed to the FakeLifecycleManager constructor during testing

static final void
setHasCreatePermission(boolean hasCreatePermission)

Will be passed to the FakeLifecycleManager constructor during testing

Public constructors

FakeRuntimeFactory

Added in 1.0.0-alpha04
public FakeRuntimeFactory()

Public methods

createRuntime

Added in 1.0.0-alpha04
public @NonNull FakeRuntime createRuntime(@NonNull Activity activity)

Creates a Runtime instance

getRequirements

Added in 1.0.0-alpha04
public @NonNull Set<@NonNull FeaturegetRequirements()

The set of features that this service requires.

hasCreatePermission

Added in 1.0.0-alpha04
public static final boolean hasCreatePermission()

Will be passed to the FakeLifecycleManager constructor during testing

setHasCreatePermission

Added in 1.0.0-alpha04
public static final void setHasCreatePermission(boolean hasCreatePermission)

Will be passed to the FakeLifecycleManager constructor during testing