Mattia Tommasone
04/08/2021, 2:47 PMivano
04/08/2021, 2:58 PMivano
04/08/2021, 3:00 PMEmployeeAttribute
ivano
04/08/2021, 3:01 PMivano
04/08/2021, 3:01 PMivano
04/08/2021, 3:01 PMMattia Tommasone
04/08/2021, 3:01 PMevery
blocksMattia Tommasone
04/08/2021, 3:01 PManswers
rather than returns
Mattia Tommasone
04/08/2021, 3:02 PManswers
takes a lambda where you can put some logic to determine the value you want to be returned according to different conditionsMattia Tommasone
04/08/2021, 3:02 PMfirstArg()
to capture the arguments that were passed to the function being stubbedivano
04/08/2021, 3:06 PMMatteo Mirk
04/09/2021, 6:21 AMEmployeesRepositoryInterface
that applies your stub logic:
class FakeEmployeesRepository : EmployeesRepositoryInterface {
override fun getEmployee(id: String) {
// calculate an employee by id...
}
}
ivano
04/09/2021, 6:26 AMMatteo Mirk
04/09/2021, 6:29 AMivano
04/10/2021, 12:18 PMivano
04/10/2021, 12:18 PM