TestPackageInstaller
class TestPackageInstaller @JvmOverloads constructor(sessionFactory: TestInstallSessionFactory = TestInstallSessionFactory.withScript(
TestSessionScript.auto(Session.State.Succeeded)
)) : PackageInstaller
An in-memory PackageInstaller test double.
Sessions are stored in memory and returned via ImmediateFuture from async accessors, which makes it suitable for deterministic JVM tests.
By default, creates sessions with TestSessionScript.auto, completing with Session.State.Succeeded.
Constructors
Link copied to clipboard
constructor(sessionFactory: TestInstallSessionFactory = TestInstallSessionFactory.withScript(
TestSessionScript.auto(Session.State.Succeeded)
))
Returns a TestPackageInstaller which creates all sessions with the provided script.
Properties
Functions
Link copied to clipboard
Clears all sessions in this repository.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Adds an existing session to this repository.