FakePermissionControllerOverrides


class FakePermissionControllerOverrides


Used to override or intercept responses to emulate scenarios that FakePermissionController doesn't support directly, such as throwing an exception or applying custom logic to the responses.

Every call in FakePermissionController can be overridden.

Summary

Public constructors

FakePermissionControllerOverrides(
    getGrantedPermissions: Stub<UnitSet<String>>?,
    revokeAllPermissions: Stub<UnitUnit>?
)

Public properties

Stub<UnitSet<String>>?

A Stub used to set the next responses used in getGrantedPermissions.

Stub<UnitUnit>?

A Stub used to set the next responses used in revokeAllPermissions.

Public constructors

FakePermissionControllerOverrides

FakePermissionControllerOverrides(
    getGrantedPermissions: Stub<UnitSet<String>>? = null,
    revokeAllPermissions: Stub<UnitUnit>? = null
)
Parameters
getGrantedPermissions: Stub<UnitSet<String>>? = null

A Stub used to set the next responses used in FakePermissionController.getGrantedPermissions.

revokeAllPermissions: Stub<UnitUnit>? = null

A Stub used to set the next responses used in FakePermissionController.revokeAllPermissions.

Public properties

getGrantedPermissions

Added in 1.0.0-alpha04
var getGrantedPermissionsStub<UnitSet<String>>?

A Stub used to set the next responses used in getGrantedPermissions.

Once all stubbed responses are consumed (or if the stub is null), FakePermissionController.getGrantedPermissions will fall back to its default behavior of returning the set of granted permissions.

revokeAllPermissions

Added in 1.0.0-alpha04
var revokeAllPermissionsStub<UnitUnit>?

A Stub used to set the next responses used in revokeAllPermissions.

Once all stubbed responses are consumed (or if the stub is null), FakePermissionController.revokeAllPermissions will fall back to its default behavior of clearing the set of granted permissions.