diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/store/SiteStore.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/store/SiteStore.kt index 7eb3fdb606..c456cb99be 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/store/SiteStore.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/store/SiteStore.kt @@ -109,9 +109,12 @@ import javax.inject.Singleton /** * SQLite based only. There is no in memory copy of mapped data, everything is queried from the DB. + * + * NOTE: This class needs to be open because it's mocked in android tests in the WPAndroid project. + * TODO: consider adding https://kotlinlang.org/docs/all-open-plugin.html */ @Singleton -class SiteStore +open class SiteStore @Inject constructor( dispatcher: Dispatcher?, private val postSqlUtils: PostSqlUtils, @@ -938,8 +941,11 @@ class SiteStore /** * Obtains the site with the given (local) id and returns it as a [SiteModel]. + * + * NOTE: This method needs to be open because it's mocked in android tests in the WPAndroid project. + * TODO: consider adding https://kotlinlang.org/docs/all-open-plugin.html */ - fun getSiteByLocalId(id: Int): SiteModel? { + open fun getSiteByLocalId(id: Int): SiteModel? { val result = siteSqlUtils.getSitesWithLocalId(id) return if (result.isNotEmpty()) { result[0]