January 2018
Intermediate to advanced
434 pages
14h 1m
English
We usually use Mockito to mock Android classes, but let's test a simple class using Mockito:
@Testfun test_functionUnderTest(){ val classUnderTest= mock(Utility::class.java) classUnderTest.functionUnderTest() verify(classUnderTest).functionUnderTest()}
org.mockito.exceptions.base.MockitoException: Cannot mock/spy class com.ankoexamples.app.UtilityMockito cannot mock/spy because : - final class ...
Read now
Unlock full access