- public void fetchSoneWithUriDownloadsSoneWithUri() {
- SoneDownloader soneDownloader = mock(SoneDownloader.class);
- Sone sone = mock(Sone.class);
- FreenetURI soneUri = mock(FreenetURI.class);
- when(sone.getRequestUri()).thenReturn(soneUri);
- FetchSoneWithUri fetchSoneWithUri = soneDownloader.new FetchSoneWithUri(sone);
- fetchSoneWithUri.run();
- verify(soneDownloader).fetchSone(eq(sone), eq(soneUri));
- }
-
- @Test
- public void fetchSoneDownloadsSone() {
- SoneDownloader soneDownloader = mock(SoneDownloader.class);
- Sone sone = mock(Sone.class);
- FetchSone fetchSone = soneDownloader.new FetchSone(sone);
- fetchSone.run();
- verify(soneDownloader).fetchSone(eq(sone));
- }
-
- @Test