Architecture-components-samples: How does OpenForTesting annotation work?

Created on 28 Apr 2018  路  1Comment  路  Source: android/architecture-components-samples

In GithubBrowserSample,

Mockito cannot mock final classes and Kotlin class is final by defualt. But @yigit solved it by using OpenForTesting annotation.

I found that OpenForTesting annotation exists in both Release and debug sources. I've tried to find out how it works, but I couldn't.

Could someone explain how this annotation works, or how does it make Kotlin classes open for Mockito?

Most helpful comment

This explains everything.

>All comments

This explains everything.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucandr picture lucandr  路  15Comments

fabioCollini picture fabioCollini  路  84Comments

iammert picture iammert  路  14Comments

hasnain-ahmad picture hasnain-ahmad  路  16Comments

shanuka picture shanuka  路  13Comments