@Test public void testPutBytesWithMetadata_notSuccessful() { mockNotSuccessfulResultForTask(mockUploadTask, new IllegalStateException()); when(mockStorageReference.putBytes(new byte[] { 1, 2, 3 }, mockStorageMetadata)).thenReturn( mockUploadTask); TestObserver<UploadTask.TaskSnapshot> obs = TestObserver.create(); RxFirebaseStorage.putBytes(mockStorageReference, new byte[] { 1, 2, 3 }, mockStorageMetadata) .subscribe(obs); verifyAddOnCompleteListenerForTask(mockUploadTask); callOnComplete(mockUploadTask); obs.dispose(); callOnComplete(mockUploadTask); obs.assertError(IllegalStateException.class); obs.assertNoValues(); }
public static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref, byte[] bytes) { return Single.create(new PutBytesOnSubscribe(ref, bytes)); }
RxFirebaseStorage { public static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref, byte[] bytes) { return Single.create(new PutBytesOnSubscribe(ref, bytes)); } }
RxFirebaseStorage { public static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref, byte[] bytes) { return Single.create(new PutBytesOnSubscribe(ref, bytes)); } private  RxFirebaseStorage(); }
RxFirebaseStorage { public static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref, byte[] bytes) { return Single.create(new PutBytesOnSubscribe(ref, bytes)); } private  RxFirebaseStorage(); static Single<byte[]> getBytes(@NonNull StorageReference ref,
      final long maxDownloadSizeBytes); static Completable delete(@NonNull StorageReference ref); static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull StorageReference ref,
      @NonNull Uri uri); static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull StorageReference ref,
      @NonNull File file); static Single<StorageMetadata> getMetadata(@NonNull StorageReference ref); static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull StorageReference ref); static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull StorageReference ref,
      StreamDownloadTask.StreamProcessor streamProcessor); static Single<Uri> getDownloadUrl(@NonNull StorageReference ref); static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref,
      byte[] bytes); static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref,
      byte[] bytes, StorageMetadata storageMetadata); static Single<UploadTask.TaskSnapshot> putFile(@NonNull StorageReference ref,
      @NonNull Uri uri); static Single<UploadTask.TaskSnapshot> putFile(@NonNull StorageReference ref,
      @NonNull Uri uri, @NonNull StorageMetadata storageMetadata); static Single<UploadTask.TaskSnapshot> putFile(@NonNull StorageReference ref,
      @NonNull Uri uri, @Nullable StorageMetadata storageMetadata,
      @Nullable Uri existingUploadUri); static Single<UploadTask.TaskSnapshot> putStream(@NonNull StorageReference ref,
      @NonNull InputStream inputStream); static Single<UploadTask.TaskSnapshot> putStream(@NonNull StorageReference ref,
      @NonNull InputStream inputStream, @NonNull StorageMetadata storageMetadata); static Single<StorageMetadata> updateMetadata(@NonNull StorageReference ref,
      @NonNull StorageMetadata storageMetadata); }
RxFirebaseStorage { public static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref, byte[] bytes) { return Single.create(new PutBytesOnSubscribe(ref, bytes)); } private  RxFirebaseStorage(); static Single<byte[]> getBytes(@NonNull StorageReference ref,
      final long maxDownloadSizeBytes); static Completable delete(@NonNull StorageReference ref); static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull StorageReference ref,
      @NonNull Uri uri); static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull StorageReference ref,
      @NonNull File file); static Single<StorageMetadata> getMetadata(@NonNull StorageReference ref); static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull StorageReference ref); static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull StorageReference ref,
      StreamDownloadTask.StreamProcessor streamProcessor); static Single<Uri> getDownloadUrl(@NonNull StorageReference ref); static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref,
      byte[] bytes); static Single<UploadTask.TaskSnapshot> putBytes(@NonNull StorageReference ref,
      byte[] bytes, StorageMetadata storageMetadata); static Single<UploadTask.TaskSnapshot> putFile(@NonNull StorageReference ref,
      @NonNull Uri uri); static Single<UploadTask.TaskSnapshot> putFile(@NonNull StorageReference ref,
      @NonNull Uri uri, @NonNull StorageMetadata storageMetadata); static Single<UploadTask.TaskSnapshot> putFile(@NonNull StorageReference ref,
      @NonNull Uri uri, @Nullable StorageMetadata storageMetadata,
      @Nullable Uri existingUploadUri); static Single<UploadTask.TaskSnapshot> putStream(@NonNull StorageReference ref,
      @NonNull InputStream inputStream); static Single<UploadTask.TaskSnapshot> putStream(@NonNull StorageReference ref,
      @NonNull InputStream inputStream, @NonNull StorageMetadata storageMetadata); static Single<StorageMetadata> updateMetadata(@NonNull StorageReference ref,
      @NonNull StorageMetadata storageMetadata);  }