MockPortalService class

Mock implementation of PortalService for repository unit tests and demo mode.

Implemented types

Constructors

MockPortalService()

Properties

avatarResult Uint8List?
getter/setter pair
calendarResult List<CalendarEventDto>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
loginResult UserDto?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ssoUrlResult Uri?
getter/setter pair
uploadAvatarResult String?
getter/setter pair

Methods

changePassword(String currentPassword, String newPassword) Future<void>
Changes the user's NTUT Portal password.
override
getAvatar([String? filename]) Future<Uint8List>
Downloads a user's avatar from NTUT Portal.
override
getCalendar(DateTime startDate, DateTime endDate) Future<List<CalendarEventDto>>
Fetches academic calendar events within a date range.
override
getSsoUrl(String serviceCode) Future<Uri>
Returns a URL that authenticates the user with a target NTUT service via OAuth2 authorization code.
override
login(String username, String password) Future<UserDto>
Authenticates a user with NTUT Portal credentials.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sso(String serviceCode) Future<void>
Performs single sign-on (SSO) to authenticate with a target NTUT service.
override
toString() String
A string representation of this object.
inherited
uploadAvatar(Uint8List imageBytes, String? oldFilename) Future<String>
Uploads a new profile photo to NTUT Portal, replacing the current one.
override

Operators

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