목록전체 글 (1358)
오늘도 공부
꽤 괜찮은 것 많네요.http://download.androidhive.info/
출처 : https://raseshmori.wordpress.com/2015/01/07/mockito-and-power-mockito-cheatsheet/@RunWith(PowerMockRunner.class) – Tell Junit that run this test using PowerMockRunner@PrepareForTest(A.class) – This is needed when we need to test static methods of A classAService mock = PowerMockito.mock(A.class) – Creating a mock for A classPowerMockito.when(mock.mockedMethod()).thenReturn(value) – When moc..
https://okky.kr/article/413054?utm_referrer=https%3A%2F%2Fzen.yandex.com
https://medium.com/@fabioCollini/android-testing-using-dagger-2-mockito-and-a-custom-junit-rule-c8487ed01b56
코틀린 Junit testhttps://proandroiddev.com/using-kotlin-for-tests-in-android-6d4a0c818776 핵심은 sourceSets { test.java.srcDirs += 'src/test/kotlin' } } afterEvaluate { android.sourceSets.all { sourceSet -> if (!sourceSet.name.startsWith("test")) { sourceSet.kotlin.setSrcDirs([]) } } } 으로 해서 릴리즈땐 제거 해주고 testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_ver" 을 추가 해주는게 핵심..
https://pluu.gitbooks.io/kotlin/content/
kapt { generateStubs = true } 를 왜 해줘야 하는지..ㅠㅠ 몇시간을 날린거야..!!http://pluu.github.io/blog/kotlin/2017/07/23/kotlin-generatestubs/
https://android.jlelse.eu/keddit-part-10-kotlin-dagger-2-dependency-injection-a620052a7384
Unit tests with Mockito - Tutorialhttp://www.vogella.com/tutorials/Mockito/article.html Mockito 설명https://static.javadoc.io/org.mockito/mockito-core/2.9.0/org/mockito/Mockito.html