July 2018
Intermediate to advanced
242 pages
8h 6m
English
class MyTest {}
class MyTest { val api: Api = mock()}
class MyTest { val api: Api = mock() val authenticator = Authenticator(api)}
class MyTest { val api: Api = mock() val authenticator = Authenticator(api) @Test fun `should retry auth at least 10 times when Api returns empty token`() { whenever(api.authorise(any())) doReturn "" val context = TestCoroutineContext() runBlocking(context) { authenticator.tryToAuthorise("admin:1234".toByteArray ...
Read now
Unlock full access