MockSuperuser constructor
Create mocked properties of SuperuserInterface
to emulate
superuser status.
It is forbidden to enable isActivated
without isSuperuser
.
Implementation
MockSuperuser(
{this.isSuperuser = false, this.isActivated = false, this.whoAmI = ""})
: assert(() {
if (!isSuperuser) {
return !isActivated;
}
return true;
}(), "Non-superuser cannot be activated.");