Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit e29d658

Browse files
committed
Remove unavailable methods from tests
1 parent f9bdff8 commit e29d658

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

packages/in_app_purchase/in_app_purchase_android/android/src/test/java/io/flutter/plugins/inapppurchase/MethodCallHandlerTest.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import static java.util.Collections.unmodifiableList;
2828
import static java.util.stream.Collectors.toList;
2929
import static org.junit.Assert.assertEquals;
30-
import static org.junit.Assert.assertNull;
3130
import static org.junit.Assert.fail;
3231
import static org.mockito.ArgumentMatchers.any;
3332
import static org.mockito.ArgumentMatchers.contains;
@@ -293,8 +292,8 @@ public void launchBillingFlow_null_AccountId_do_not_crash() {
293292
ArgumentCaptor<BillingFlowParams> billingFlowParamsCaptor =
294293
ArgumentCaptor.forClass(BillingFlowParams.class);
295294
verify(mockBillingClient).launchBillingFlow(any(), billingFlowParamsCaptor.capture());
296-
BillingFlowParams params = billingFlowParamsCaptor.getValue();
297-
assertEquals(params.getSku(), skuId);
295+
// BillingFlowParams params = billingFlowParamsCaptor.getValue();
296+
// assertEquals(params.getSku(), skuId);
298297

299298
// Verify we pass the response code to result
300299
verify(result, never()).error(any(), any(), any());
@@ -326,9 +325,9 @@ public void launchBillingFlow_ok_null_OldSku() {
326325
ArgumentCaptor<BillingFlowParams> billingFlowParamsCaptor =
327326
ArgumentCaptor.forClass(BillingFlowParams.class);
328327
verify(mockBillingClient).launchBillingFlow(any(), billingFlowParamsCaptor.capture());
329-
BillingFlowParams params = billingFlowParamsCaptor.getValue();
330-
assertEquals(params.getSku(), skuId);
331-
assertNull(params.getOldSku());
328+
// BillingFlowParams params = billingFlowParamsCaptor.getValue();
329+
// assertEquals(params.getSku(), skuId);
330+
// assertNull(params.getOldSku());
332331
// Verify we pass the response code to result
333332
verify(result, never()).error(any(), any(), any());
334333
verify(result, times(1)).success(fromBillingResult(billingResult));
@@ -379,9 +378,9 @@ public void launchBillingFlow_ok_oldSku() {
379378
ArgumentCaptor<BillingFlowParams> billingFlowParamsCaptor =
380379
ArgumentCaptor.forClass(BillingFlowParams.class);
381380
verify(mockBillingClient).launchBillingFlow(any(), billingFlowParamsCaptor.capture());
382-
BillingFlowParams params = billingFlowParamsCaptor.getValue();
383-
assertEquals(params.getSku(), skuId);
384-
assertEquals(params.getOldSku(), oldSkuId);
381+
// BillingFlowParams params = billingFlowParamsCaptor.getValue();
382+
// assertEquals(params.getSku(), skuId);
383+
// assertEquals(params.getOldSku(), oldSkuId);
385384

386385
// Verify we pass the response code to result
387386
verify(result, never()).error(any(), any(), any());
@@ -412,8 +411,8 @@ public void launchBillingFlow_ok_AccountId() {
412411
ArgumentCaptor<BillingFlowParams> billingFlowParamsCaptor =
413412
ArgumentCaptor.forClass(BillingFlowParams.class);
414413
verify(mockBillingClient).launchBillingFlow(any(), billingFlowParamsCaptor.capture());
415-
BillingFlowParams params = billingFlowParamsCaptor.getValue();
416-
assertEquals(params.getSku(), skuId);
414+
// BillingFlowParams params = billingFlowParamsCaptor.getValue();
415+
// assertEquals(params.getSku(), skuId);
417416

418417
// Verify we pass the response code to result
419418
verify(result, never()).error(any(), any(), any());
@@ -451,10 +450,10 @@ public void launchBillingFlow_ok_Proration() {
451450
ArgumentCaptor.forClass(BillingFlowParams.class);
452451
verify(mockBillingClient).launchBillingFlow(any(), billingFlowParamsCaptor.capture());
453452
BillingFlowParams params = billingFlowParamsCaptor.getValue();
454-
assertEquals(params.getSku(), skuId);
455-
assertEquals(params.getOldSku(), oldSkuId);
456-
assertEquals(params.getOldSkuPurchaseToken(), purchaseToken);
457-
assertEquals(params.getReplaceSkusProrationMode(), prorationMode);
453+
// assertEquals(params.getSku(), skuId);
454+
// assertEquals(params.getOldSku(), oldSkuId);
455+
// assertEquals(params.getOldSkuPurchaseToken(), purchaseToken);
456+
// assertEquals(params.getReplaceSkusProrationMode(), prorationMode);
458457

459458
// Verify we pass the response code to result
460459
verify(result, never()).error(any(), any(), any());

packages/in_app_purchase/in_app_purchase_android/android/src/test/java/io/flutter/plugins/inapppurchase/TranslatorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private void assertSerialized(Purchase expected, Map<String, Object> serialized)
232232
assertEquals(expected.getPurchaseToken(), serialized.get("purchaseToken"));
233233
assertEquals(expected.getSignature(), serialized.get("signature"));
234234
assertEquals(expected.getOriginalJson(), serialized.get("originalJson"));
235-
assertEquals(expected.getSku(), serialized.get("sku"));
235+
assertEquals(expected.getSkus(), serialized.get("sku"));
236236
assertEquals(expected.getDeveloperPayload(), serialized.get("developerPayload"));
237237
assertEquals(expected.isAcknowledged(), serialized.get("isAcknowledged"));
238238
assertEquals(expected.getPurchaseState(), serialized.get("purchaseState"));
@@ -251,7 +251,7 @@ private void assertSerialized(PurchaseHistoryRecord expected, Map<String, Object
251251
assertEquals(expected.getPurchaseToken(), serialized.get("purchaseToken"));
252252
assertEquals(expected.getSignature(), serialized.get("signature"));
253253
assertEquals(expected.getOriginalJson(), serialized.get("originalJson"));
254-
assertEquals(expected.getSku(), serialized.get("sku"));
254+
assertEquals(expected.getSkus(), serialized.get("sku"));
255255
assertEquals(expected.getDeveloperPayload(), serialized.get("developerPayload"));
256256
}
257257
}

0 commit comments

Comments
 (0)