@Override public void onReady(@Nonnull BillingRequests requests, @Nonnull String product, boolean billingSupported) { mListener.onReady(requests, product, billingSupported); }
@Test public void testAllProductsShouldBeSupported() throws Exception { final AwaitingListener l = new AwaitingListener(); mCheckout.start(l); l.waitWhileLoading(); verify(l.mListener, times(2)).onReady(any(BillingRequests.class), anyString(), eq(true)); verify(l.mListener, never()).onReady(any(BillingRequests.class), anyString(), eq(false)); verify(l.mListener).onReady(any(BillingRequests.class)); }
@Override public void onReady(@Nonnull BillingRequests requests) { mListener.onReady(requests); mLatch.countDown(); }