X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneDownloaderTest.java;h=f879cac375aa101feb56611b221100e71baefd53;hp=be697b3c6abd335f774655694e0cf56f48229dea;hb=4b42574c9ec4490100ac3e87b9c2f3aac965a202;hpb=c8b9bb56bd7a73e39565fd577e14f8d5e1215c5d diff --git a/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java b/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java index be697b3..f879cac 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java +++ b/src/test/java/net/pterodactylus/sone/core/SoneDownloaderTest.java @@ -109,7 +109,7 @@ public class SoneDownloaderTest { FreenetURI finalRequestUri = requestUri.sskForUSK() .setMetaString(new String[] { "sone.xml" }); setupSoneAsUnknown(); - soneDownloader.fetchSoneAction(sone).run(); + soneDownloader.fetchSoneAsSskAction(sone).run(); verify(freenetInterface).fetchUri(finalRequestUri); verifyThatSoneStatusWasChangedToDownloadingAndBackTo(unknown); verify(core, never()).updateSone(any(Sone.class)); @@ -126,7 +126,7 @@ public class SoneDownloaderTest { public void notBeingAbleToFetchAKnownSoneDoesNotUpdateCore() { FreenetURI finalRequestUri = requestUri.sskForUSK() .setMetaString(new String[] { "sone.xml" }); - soneDownloader.fetchSoneAction(sone).run(); + soneDownloader.fetchSoneAsSskAction(sone).run(); verify(freenetInterface).fetchUri(finalRequestUri); verifyThatSoneStatusWasChangedToDownloadingAndBackTo(idle); verify(core, never()).updateSone(any(Sone.class)); @@ -139,7 +139,7 @@ public class SoneDownloaderTest { setupSoneAsUnknown(); when(freenetInterface.fetchUri(finalRequestUri)).thenThrow(NullPointerException.class); try { - soneDownloader.fetchSoneAction(sone).run(); + soneDownloader.fetchSoneAsSskAction(sone).run(); } finally { verify(freenetInterface).fetchUri(finalRequestUri); verifyThatSoneStatusWasChangedToDownloadingAndBackTo(unknown); @@ -153,7 +153,7 @@ public class SoneDownloaderTest { .setMetaString(new String[] { "sone.xml" }); when(freenetInterface.fetchUri(finalRequestUri)).thenThrow( NullPointerException.class); try { - soneDownloader.fetchSoneAction(sone).run(); + soneDownloader.fetchSoneAsSskAction(sone).run(); } finally { verify(freenetInterface).fetchUri(finalRequestUri); verifyThatSoneStatusWasChangedToDownloadingAndBackTo(idle); @@ -165,7 +165,7 @@ public class SoneDownloaderTest { public void fetchingSoneWithInvalidXmlWillNotUpdateTheCore() throws IOException { final Fetched fetchResult = createFetchResult(requestUri, getClass().getResourceAsStream("sone-parser-not-xml.xml")); when(freenetInterface.fetchUri(requestUri)).thenReturn(fetchResult); - soneDownloader.fetchSoneAction(sone).run(); + soneDownloader.fetchSoneAsSskAction(sone).run(); verify(core, never()).updateSone(any(Sone.class)); } @@ -174,7 +174,7 @@ public class SoneDownloaderTest { final Fetched fetchResult = createFetchResult(requestUri, getClass().getResourceAsStream("sone-parser-no-payload.xml")); when(core.soneBuilder()).thenReturn(null); when(freenetInterface.fetchUri(requestUri)).thenReturn(fetchResult); - soneDownloader.fetchSoneAction(sone).run(); + soneDownloader.fetchSoneAsSskAction(sone).run(); verify(core, never()).updateSone(any(Sone.class)); }