@Test public void onDeleteSuccess() { mListener.onDeleteSuccess(mReceipt, new DatabaseOperationMetadata()); verify(mDriveDatabaseManager).syncDatabase(); verify(mDriveReceiptsManager).handleDelete(mReceipt); }
@Override public void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { super.onDeleteSuccess(receipt, databaseOperationMetadata); if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveReceiptsManager.handleDelete(receipt); } }
ReceiptBackupListener extends DatabaseBackupListener<Receipt> { @Override public void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { super.onDeleteSuccess(receipt, databaseOperationMetadata); if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveReceiptsManager.handleDelete(receipt); } } }
ReceiptBackupListener extends DatabaseBackupListener<Receipt> { @Override public void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { super.onDeleteSuccess(receipt, databaseOperationMetadata); if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveReceiptsManager.handleDelete(receipt); } } ReceiptBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager, @NonNull DriveReceiptsManager driveReceiptsManager); }
ReceiptBackupListener extends DatabaseBackupListener<Receipt> { @Override public void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { super.onDeleteSuccess(receipt, databaseOperationMetadata); if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveReceiptsManager.handleDelete(receipt); } } ReceiptBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager, @NonNull DriveReceiptsManager driveReceiptsManager); @Override void onInsertSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onUpdateSuccess(@NonNull Receipt oldReceipt, @NonNull Receipt newReceipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata); }
ReceiptBackupListener extends DatabaseBackupListener<Receipt> { @Override public void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { super.onDeleteSuccess(receipt, databaseOperationMetadata); if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveReceiptsManager.handleDelete(receipt); } } ReceiptBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager, @NonNull DriveReceiptsManager driveReceiptsManager); @Override void onInsertSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onUpdateSuccess(@NonNull Receipt oldReceipt, @NonNull Receipt newReceipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onDeleteSuccess(@NonNull Receipt receipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata);  }