ExamerTestsViewModel

class ExamerTestsViewModel(    authenticationService: AuthenticationService,     repository: Repository,     testDetailsListType: TestDetailsListType) : ViewModel, TestsViewModel

A viewModel that can be used to in conjunction with a screen used to display a list of TestDetails items.

Parameters

authenticationService

the authentication service to be used.

repository

a reference to the repository that the viewModel will use to fetch the data.

testDetailsListType

the type of TestDetailsListType that the viewModel would be responsible for. For example, if the viewModel is passed TestDetailsListType.SCHEDULED_TESTS all operations within the viewModel will be performed with respect to scheduled tests.

Constructors

Link copied to clipboard
fun ExamerTestsViewModel(    authenticationService: AuthenticationService,     repository: Repository,     testDetailsListType: TestDetailsListType)

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open override fun fetchWorkBookListForTestDetails(    testDetails: TestDetails,     onSuccess: (List<WorkBook>) -> Unit,     onFailure: (Throwable) -> Unit?)

Used to fetch a list of workbooks for the specified test.

Link copied to clipboard
open fun <T : Any> getTag(p0: String): T
Link copied to clipboard
open override fun markTestAsMissed(testDetails: TestDetails)

Used to mark the specified test as missed.

Link copied to clipboard
open fun onCleared()
Link copied to clipboard
open override fun refreshTestDetailsList()

Used to refresh testDetailsList.

Link copied to clipboard
open fun <T : Any> setTagIfAbsent(p0: String, p1: T): T

Properties

Link copied to clipboard
open override val testDetailsList: State<List<TestDetails>>

A state property that is holds a list of TestDetails.

Link copied to clipboard
open override val testsViewModelUiState: State<TestsViewModelUiState>

A state property that holds that hold the current TestsViewModelUiState.