@Test public void onSyncInsertSuccess() { mListener.onInsertSuccess(new Object(), new DatabaseOperationMetadata(OperationFamilyType.Sync)); verify(mDriveDatabaseManager, never()).syncDatabase(); }
@Override public void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveDatabaseManager.syncDatabase(); } }
DatabaseBackupListener extends StubTableEventsListener<ModelType> { @Override public void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveDatabaseManager.syncDatabase(); } } }
DatabaseBackupListener extends StubTableEventsListener<ModelType> { @Override public void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveDatabaseManager.syncDatabase(); } } DatabaseBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager); }
DatabaseBackupListener extends StubTableEventsListener<ModelType> { @Override public void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveDatabaseManager.syncDatabase(); } } DatabaseBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager); @Override void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onUpdateSuccess(@NonNull ModelType oldT, @NonNull ModelType newT, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onDeleteSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata); }
DatabaseBackupListener extends StubTableEventsListener<ModelType> { @Override public void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata) { if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) { mDriveDatabaseManager.syncDatabase(); } } DatabaseBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager); @Override void onInsertSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onUpdateSuccess(@NonNull ModelType oldT, @NonNull ModelType newT, @NonNull DatabaseOperationMetadata databaseOperationMetadata); @Override void onDeleteSuccess(@NonNull ModelType modelType, @NonNull DatabaseOperationMetadata databaseOperationMetadata);  }