Bona Iqiniso Application Board

V3BiUserBase

Specification for V3BiUserBase

Attributes

AttributeTypeDescription
usernamestringUnique identifier for the user.
firstNamestringFirst name of the user.
lastNamestringLast name of the user.
organizationstringName of the organization the user belongs to.
emailstringEmail address of the user.
rolestringRole assigned to the user (e.g., Admin, User, Guest).
passwordstringPassword for the user account.
preferredLanguagestringUser’s preferred language for the interface.

Methods

MethodDescription
constructorInitializes a new instance of V3BiUserBase with the provided attributes.

Constructor

Signature:

constructor(username: string, firstName: string, lastName: string, organization: string, email: string, preferredLanguage: string, role: string)

Parameters:

  • username (string): Unique identifier for the user.
  • firstName (string): First name of the user.
  • lastName (string): Last name of the user.
  • organization (string): Name of the organization the user belongs to.
  • email (string): Email address of the user.
  • preferredLanguage (string): User’s preferred language for the interface.
  • role (string): Role assigned to the user (e.g., Admin, User, Guest).

Description:
The constructor initializes the V3BiUserBase instance with the provided attributes.

Example Usage

const user = new V3BiUserBase(
  'jdoe',
  'John',
  'Doe',
  'Acme Corp',
  'jdoe@example.com',
  'en',
  'Admin'
);

Specification in Tabular Form (Given, When, Then)

Attributes

ScenarioGivenWhenThen
Create an instance with all attributesThe username is 'jdoe', firstName is 'John', lastName is 'Doe', organization is 'Acme Corp', email is 'jdoe@example.com', preferredLanguage is 'en', role is 'Admin'I create a new V3BiUserBase with the provided attributesThe instance should have the specified attributes
Handle empty string as an attributeThe username is '', firstName is 'John', lastName is 'Doe', organization is 'Acme Corp', email is 'jdoe@example.com', preferredLanguage is 'en', role is 'Admin'I create a new V3BiUserBase with an empty username and other valid attributesThe instance should have username as '' and other attributes as specified
Handle undefined as an attributeThe username is 'jdoe', firstName is 'John', lastName is 'Doe', organization is 'Acme Corp', email is 'jdoe@example.com', preferredLanguage is undefined, role is 'Admin'I create a new V3BiUserBase with preferredLanguage as undefined and other valid attributesThe instance should have preferredLanguage as undefined and other attributes as specified
Handle special characters in attributesThe username is 'jdoe@#$', firstName is 'John', lastName is 'Doe', organization is 'Acme Corp', email is 'jdoe@example.com', preferredLanguage is 'en', role is 'Admin'I create a new V3BiUserBase with special characters in username and other valid attributesThe instance should have username as 'jdoe@#$' and other attributes as specified
Handle a valid role attributeThe username is 'jdoe', firstName is 'John', lastName is 'Doe', organization is 'Acme Corp', email is 'jdoe@example.com', preferredLanguage is 'en', role is 'Admin'I create a new V3BiUserBase with the provided attributesThe instance should have role as 'Admin' and other attributes as specified

Methods

ScenarioGivenWhenThen
Initialize a user with the constructorAll necessary attributes (username, firstName, lastName, organization, email, preferredLanguage, role)I create a new instance of V3BiUserBase with these attributesThe instance should be initialized with the specified attributes
Handle missing or empty attributesMissing or empty attributes for username, firstName, lastName, organization, email, preferredLanguage, or roleI create a new instance of V3BiUserBase with missing or empty attributesThe instance should be initialized with default or undefined values where attributes are missing or empty
Handle special characters in attributesSpecial characters in attributes like username, firstName, lastName, etc.I create a new instance of V3BiUserBase with these attributesThe instance should correctly store the attributes with special characters