MockSuperuser class final

Replicate behaviour of SuperuserInterface, which fulfilled requirements of testing.

It is ideal for widget testing that it can simulate superuser status without Run as administrator or sudo command.

Implemented types

Constructors

MockSuperuser({bool isSuperuser = false, bool isActivated = false, String whoAmI = "", Set<String> groups = const <String>{}})
Create mocked properties of SuperuserInterface to emulate superuser status.
const

Properties

groups Set<String>
Obtains all groups name that this user is associated.
final
hashCode int
The hash code for this object.
no setterinherited
isActivated bool
Determine this program is executed with superuser right.
final
isSuperuser bool
Determine current user has superuser role.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
whoAmI String
Retrive name of user, who run this program.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited