@Test public void postUpdate() { alterations.postUpdate(category1, category2) .test() .assertValue(category2) .assertComplete() .assertNoErrors(); verify(receiptsTable).clearCache(); }
@NonNull @Override public Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory) { return super.postUpdate(oldCategory, newCategory) .doOnSuccess(ignored -> receiptsTable.clearCache()); }
CategoriesTableActionAlterations extends StubTableActionAlterations<Category> { @NonNull @Override public Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory) { return super.postUpdate(oldCategory, newCategory) .doOnSuccess(ignored -> receiptsTable.clearCache()); } }
CategoriesTableActionAlterations extends StubTableActionAlterations<Category> { @NonNull @Override public Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory) { return super.postUpdate(oldCategory, newCategory) .doOnSuccess(ignored -> receiptsTable.clearCache()); } CategoriesTableActionAlterations(@NonNull ReceiptsTable receiptsTable); }
CategoriesTableActionAlterations extends StubTableActionAlterations<Category> { @NonNull @Override public Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory) { return super.postUpdate(oldCategory, newCategory) .doOnSuccess(ignored -> receiptsTable.clearCache()); } CategoriesTableActionAlterations(@NonNull ReceiptsTable receiptsTable); @NonNull @Override Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory); @NonNull @Override Single<Category> postDelete(@Nullable Category category); }
CategoriesTableActionAlterations extends StubTableActionAlterations<Category> { @NonNull @Override public Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory) { return super.postUpdate(oldCategory, newCategory) .doOnSuccess(ignored -> receiptsTable.clearCache()); } CategoriesTableActionAlterations(@NonNull ReceiptsTable receiptsTable); @NonNull @Override Single<Category> postUpdate(@NonNull Category oldCategory, @Nullable Category newCategory); @NonNull @Override Single<Category> postDelete(@Nullable Category category);  }