@Test public void onStart() throws Exception { ReleaseDetails releaseDetails = mockReleaseDetails(true); ReleaseDownloadListener releaseDownloadListener = new ReleaseDownloadListener(mContext, releaseDetails); long mockTime = 1000 * 1000 * 1000; releaseDownloadListener.onStart(mockTime); verify(mDistribute).setDownloading(releaseDetails, mockTime); }
@WorkerThread @Override public void onStart(long enqueueTime) { AppCenterLog.debug(LOG_TAG, String.format(Locale.ENGLISH, "Start download %s (%d) update.", mReleaseDetails.getShortVersion(), mReleaseDetails.getVersion())); Distribute.getInstance().setDownloading(mReleaseDetails, enqueueTime); }
ReleaseDownloadListener implements ReleaseDownloader.Listener { @WorkerThread @Override public void onStart(long enqueueTime) { AppCenterLog.debug(LOG_TAG, String.format(Locale.ENGLISH, "Start download %s (%d) update.", mReleaseDetails.getShortVersion(), mReleaseDetails.getVersion())); Distribute.getInstance().setDownloading(mReleaseDetails, enqueueTime); } }
ReleaseDownloadListener implements ReleaseDownloader.Listener { @WorkerThread @Override public void onStart(long enqueueTime) { AppCenterLog.debug(LOG_TAG, String.format(Locale.ENGLISH, "Start download %s (%d) update.", mReleaseDetails.getShortVersion(), mReleaseDetails.getVersion())); Distribute.getInstance().setDownloading(mReleaseDetails, enqueueTime); } ReleaseDownloadListener(@NonNull Context context, @NonNull ReleaseDetails releaseDetails); }
ReleaseDownloadListener implements ReleaseDownloader.Listener { @WorkerThread @Override public void onStart(long enqueueTime) { AppCenterLog.debug(LOG_TAG, String.format(Locale.ENGLISH, "Start download %s (%d) update.", mReleaseDetails.getShortVersion(), mReleaseDetails.getVersion())); Distribute.getInstance().setDownloading(mReleaseDetails, enqueueTime); } ReleaseDownloadListener(@NonNull Context context, @NonNull ReleaseDetails releaseDetails); @WorkerThread @Override void onStart(long enqueueTime); @WorkerThread @Override synchronized boolean onProgress(final long currentSize, final long totalSize); @WorkerThread @Override boolean onComplete(@NonNull Uri localUri); @WorkerThread @Override void onError(@Nullable String errorMessage); }
ReleaseDownloadListener implements ReleaseDownloader.Listener { @WorkerThread @Override public void onStart(long enqueueTime) { AppCenterLog.debug(LOG_TAG, String.format(Locale.ENGLISH, "Start download %s (%d) update.", mReleaseDetails.getShortVersion(), mReleaseDetails.getVersion())); Distribute.getInstance().setDownloading(mReleaseDetails, enqueueTime); } ReleaseDownloadListener(@NonNull Context context, @NonNull ReleaseDetails releaseDetails); @WorkerThread @Override void onStart(long enqueueTime); @WorkerThread @Override synchronized boolean onProgress(final long currentSize, final long totalSize); @WorkerThread @Override boolean onComplete(@NonNull Uri localUri); @WorkerThread @Override void onError(@Nullable String errorMessage);  }