TestDetails

data class TestDetails(    val id: String,     val title: String,     val description: String,     val language: String,     val localDateTime: LocalDateTime,     val totalNumberOfWorkBooks: Int,     val testDurationInMinutes: Int,     val testStatus: Status) : Serializable

A data class that models a test.

Parameters

title

the title of the test.

description

the description of the test.

language

indicates the language that the test focuses on.

localDateTime

an instance of LocalDateTime that indicates the time and date of the test. The getLocalDateTimeForMillis static method can be used to generate the instance for a given timestamp in milliseconds.

totalNumberOfWorkBooks

indicates the total number of questions in this test.

testDurationInMinutes

indicates the number of minutes allotted for each question.

Constructors

Link copied to clipboard
fun TestDetails(    id: String,     title: String,     description: String,     language: String,     localDateTime: LocalDateTime,     totalNumberOfWorkBooks: Int,     testDurationInMinutes: Int,     testStatus: Status)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val description: String
Link copied to clipboard
val id: String
Link copied to clipboard
val language: String
Link copied to clipboard
val localDateTime: LocalDateTime
Link copied to clipboard
val testDurationInMinutes: Int
Link copied to clipboard
val testStatus: Status
Link copied to clipboard
val title: String
Link copied to clipboard
val totalNumberOfWorkBooks: Int

Extensions

Link copied to clipboard
fun TestDetails.getDateStringAndTimeString(is24hourFormat: Boolean = false): Pair<String, String>

Used to get a pair consisting of strings representing date and time. The first value in the pair is the date string and the second value is the time.

Link copied to clipboard
fun TestDetails.isScheduledNotOpen(): Boolean

Used to check whether the test is scheduled, but not open.

Link copied to clipboard
fun TestDetails.isTestExpired(): Boolean

Used to check whether the test has expired (The window for taking the test has expired).

Link copied to clipboard
fun TestDetails.isTestOpen(): Boolean

Used to check whether the test is open for accepting answers.