Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit fe70666

Browse files
committed
test: implement new protocol methods
Update FakeModule in OpenIapStoreTest to implement getAvailableItems and getStorefront to match OpenIapProtocol changes.
1 parent e246399 commit fe70666

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

openiap/src/test/java/dev/hyo/openiap/OpenIapStoreTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class OpenIapStoreTest {
3838

3939
override suspend fun getAvailablePurchases(options: PurchaseOptions?): List<OpenIapPurchase> = purchasesToReturn
4040

41+
override suspend fun getAvailableItems(type: ProductRequest.ProductRequestType): List<OpenIapPurchase> = purchasesToReturn
42+
4143
override suspend fun getActiveSubscriptions(subscriptionIds: List<String>?): List<OpenIapActiveSubscription> = activeSubsToReturn
4244

4345
override suspend fun hasActiveSubscriptions(subscriptionIds: List<String>?): Boolean = activeSubsToReturn.isNotEmpty()
@@ -67,6 +69,8 @@ class OpenIapStoreTest {
6769
lastDeepLinkOptions = options
6870
}
6971

72+
override suspend fun getStorefront(): String = ""
73+
7074
override fun addPurchaseUpdateListener(listener: OpenIapPurchaseUpdateListener) {
7175
updateListeners.add(listener)
7276
}
@@ -171,4 +175,3 @@ class OpenIapStoreTest {
171175
assertEquals("sku.sub", result.first().productId)
172176
}
173177
}
174-

0 commit comments

Comments
 (0)