Home
last modified time | relevance | path

Searched refs:mMockDownloader (Results 1 – 2 of 2) sorted by relevance

/tools/tradefederation/core/javatests/com/android/tradefed/build/
DFileDownloadCacheTest.java63 @Mock IFileDownloader mMockDownloader; field in FileDownloadCacheTest
139 reset(mMockDownloader); in testFetchRemoteFile_cacheHit()
157 reset(mMockDownloader); in testFetchRemoteFile_cacheHit_notFresh()
192 .when(mMockDownloader) in testFetchRemoteFile_downloadFailed()
196 mCache.fetchRemoteFile(mMockDownloader, REMOTE_PATH); in testFetchRemoteFile_downloadFailed()
211 .when(mMockDownloader) in testFetchRemoteFile_downloadFailed_Runtime()
215 mCache.fetchRemoteFile(mMockDownloader, REMOTE_PATH); in testFetchRemoteFile_downloadFailed_Runtime()
241 reset(mMockDownloader); in testFetchRemoteFile_cacheMissing()
244 file = mCache.fetchRemoteFile(mMockDownloader, REMOTE_PATH); in testFetchRemoteFile_cacheMissing()
282 reset(mMockDownloader); in testFetchRemoteFile_copyFailed()
[all …]
DFileDownloadCacheFuncTest.java57 @Mock IFileDownloader mMockDownloader; field in FileDownloadCacheFuncTest
97 .when(mMockDownloader) in testFetchRemoteFile_concurrent()
99 when(mMockDownloader.isFresh(Mockito.any(), Mockito.eq(REMOTE_PATH))).thenReturn(true); in testFetchRemoteFile_concurrent()
101 Thread downloadThread1 = createDownloadThread(mMockDownloader, REMOTE_PATH); in testFetchRemoteFile_concurrent()
103 Thread downloadThread2 = createDownloadThread(mMockDownloader, REMOTE_PATH); in testFetchRemoteFile_concurrent()
119 InOrder inOrder = Mockito.inOrder(mMockDownloader); in testFetchRemoteFile_concurrent()
120 inOrder.verify(mMockDownloader).downloadFile(Mockito.eq(REMOTE_PATH), Mockito.<File>any()); in testFetchRemoteFile_concurrent()
229 .when(mMockDownloader) in testFetchRemoteFile_concurrentFail()
231 when(mMockDownloader.isFresh(Mockito.any(), Mockito.eq(REMOTE_PATH))).thenReturn(true); in testFetchRemoteFile_concurrentFail()
233 Thread downloadThread1 = createDownloadThread(mMockDownloader, REMOTE_PATH); in testFetchRemoteFile_concurrentFail()
[all …]