@Test public void postUpdate() { alterations.postUpdate(paymentMethod1, paymentMethod2) .test() .assertValue(paymentMethod2) .assertComplete() .assertNoErrors(); verify(receiptsTable).clearCache(); }
@NonNull @Override public Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod) { return super.postUpdate(oldPaymentMethod, newPaymentMethod) .doOnSuccess(ignored -> receiptsTable.clearCache()); }
PaymentMethodsTableActionAlterations extends StubTableActionAlterations<PaymentMethod> { @NonNull @Override public Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod) { return super.postUpdate(oldPaymentMethod, newPaymentMethod) .doOnSuccess(ignored -> receiptsTable.clearCache()); } }
PaymentMethodsTableActionAlterations extends StubTableActionAlterations<PaymentMethod> { @NonNull @Override public Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod) { return super.postUpdate(oldPaymentMethod, newPaymentMethod) .doOnSuccess(ignored -> receiptsTable.clearCache()); } PaymentMethodsTableActionAlterations(@NonNull ReceiptsTable receiptsTable); }
PaymentMethodsTableActionAlterations extends StubTableActionAlterations<PaymentMethod> { @NonNull @Override public Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod) { return super.postUpdate(oldPaymentMethod, newPaymentMethod) .doOnSuccess(ignored -> receiptsTable.clearCache()); } PaymentMethodsTableActionAlterations(@NonNull ReceiptsTable receiptsTable); @NonNull @Override Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod); @NonNull @Override Single<PaymentMethod> postDelete(@Nullable PaymentMethod paymentMethod); }
PaymentMethodsTableActionAlterations extends StubTableActionAlterations<PaymentMethod> { @NonNull @Override public Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod) { return super.postUpdate(oldPaymentMethod, newPaymentMethod) .doOnSuccess(ignored -> receiptsTable.clearCache()); } PaymentMethodsTableActionAlterations(@NonNull ReceiptsTable receiptsTable); @NonNull @Override Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod); @NonNull @Override Single<PaymentMethod> postDelete(@Nullable PaymentMethod paymentMethod);  }