@Test public void getDownloadUrl() { TestObserver<Uri> storageTestObserver = RxFirebaseStorage.getDownloadUrl(mockStorageRef) .test(); testOnSuccessListener.getValue().onSuccess(uri); testOnCompleteListener.getValue().onComplete(mockUriTask); verify(mockStorageRef).getDownloadUrl(); storageTestObserver.assertNoErrors() .assertValueCount(1) .assertValueSet(Collections.singletonList(uri)) .assertComplete() .dispose(); }
@NonNull public static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef) { return Maybe.create(new MaybeOnSubscribe<Uri>() { @Override public void subscribe(MaybeEmitter<Uri> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.getDownloadUrl()); } }); }
RxFirebaseStorage { @NonNull public static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef) { return Maybe.create(new MaybeOnSubscribe<Uri>() { @Override public void subscribe(MaybeEmitter<Uri> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.getDownloadUrl()); } }); } }
RxFirebaseStorage { @NonNull public static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef) { return Maybe.create(new MaybeOnSubscribe<Uri>() { @Override public void subscribe(MaybeEmitter<Uri> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.getDownloadUrl()); } }); }  }
RxFirebaseStorage { @NonNull public static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef) { return Maybe.create(new MaybeOnSubscribe<Uri>() { @Override public void subscribe(MaybeEmitter<Uri> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.getDownloadUrl()); } }); }  @NonNull static Maybe<byte[]> getBytes(@NonNull final StorageReference storageRef,
                                         final long maxDownloadSizeBytes); @NonNull static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final File destinationFile); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final Uri destinationUri); @NonNull static Maybe<StorageMetadata> getMetadata(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef,
                                                                    @NonNull final StreamDownloadTask.StreamProcessor processor); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes,
                                                           @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata,
                                                          @NonNull final Uri existingUploadUri); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream,
                                                            @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream); @NonNull static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef,
                                                        @NonNull final StorageMetadata metadata); @NonNull static Completable delete(@NonNull final StorageReference storageRef); }
RxFirebaseStorage { @NonNull public static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef) { return Maybe.create(new MaybeOnSubscribe<Uri>() { @Override public void subscribe(MaybeEmitter<Uri> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.getDownloadUrl()); } }); }  @NonNull static Maybe<byte[]> getBytes(@NonNull final StorageReference storageRef,
                                         final long maxDownloadSizeBytes); @NonNull static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final File destinationFile); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final Uri destinationUri); @NonNull static Maybe<StorageMetadata> getMetadata(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef,
                                                                    @NonNull final StreamDownloadTask.StreamProcessor processor); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes,
                                                           @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata,
                                                          @NonNull final Uri existingUploadUri); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream,
                                                            @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream); @NonNull static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef,
                                                        @NonNull final StorageMetadata metadata); @NonNull static Completable delete(@NonNull final StorageReference storageRef);  }