From fa06db9c6e864183b2582a3cc3ed93df74d8a8cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 31 Jul 2014 21:14:37 +0200 Subject: [PATCH] Rename class that fetches a Sone with its URI. --- src/main/java/net/pterodactylus/sone/core/Core.java | 2 +- src/main/java/net/pterodactylus/sone/core/SoneDownloader.java | 4 ++-- src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index ffed7a9..b9fb766 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -800,7 +800,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } } soneDownloader.addSone(sone); - soneDownloaders.execute(soneDownloader.new FetchSone(sone)); + soneDownloaders.execute(soneDownloader.new FetchSoneWithUri(sone)); return sone; } } diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index 8b3ad79..8f4bf7d 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -533,11 +533,11 @@ public class SoneDownloader extends AbstractService { } } - public class FetchSone implements Runnable { + public class FetchSoneWithUri implements Runnable { private final Sone sone; - public FetchSone(Sone sone) { + public FetchSoneWithUri(Sone sone) { this.sone = sone; } diff --git a/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java b/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java index 413b8ff..73920ff 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java +++ b/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java @@ -5,7 +5,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import net.pterodactylus.sone.core.SoneDownloader.FetchSone; +import net.pterodactylus.sone.core.SoneDownloader.FetchSoneWithUri; import net.pterodactylus.sone.data.Sone; import freenet.keys.FreenetURI; @@ -20,13 +20,13 @@ import org.junit.Test; public class SoneDownloaderTest { @Test - public void fetchSoneDownloadsSone() { + public void fetchSoneWithUriDownloadsSoneWithUri() { SoneDownloader soneDownloader = mock(SoneDownloader.class); Sone sone = mock(Sone.class); FreenetURI soneUri = mock(FreenetURI.class); when(sone.getRequestUri()).thenReturn(soneUri); - FetchSone fetchSone = soneDownloader.new FetchSone(sone); - fetchSone.run(); + FetchSoneWithUri fetchSoneWithUri = soneDownloader.new FetchSoneWithUri(sone); + fetchSoneWithUri.run(); verify(soneDownloader).fetchSone(eq(sone), eq(soneUri)); } -- 2.7.4