From: David ‘Bombe’ Roden Date: Fri, 1 Aug 2014 00:22:30 +0000 (+0200) Subject: Add unit test for the insert token supplier. X-Git-Tag: 0.9-rc1^2~3^2~183 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e1fecb450747154118bb7d2e13e0fada86c42da8;p=Sone.git Add unit test for the insert token supplier. --- diff --git a/src/test/java/net/pterodactylus/sone/core/FreenetInterfaceTest.java b/src/test/java/net/pterodactylus/sone/core/FreenetInterfaceTest.java index 9e8852b..486b177 100644 --- a/src/test/java/net/pterodactylus/sone/core/FreenetInterfaceTest.java +++ b/src/test/java/net/pterodactylus/sone/core/FreenetInterfaceTest.java @@ -34,6 +34,7 @@ import net.pterodactylus.sone.TestUtil; import net.pterodactylus.sone.core.FreenetInterface.Callback; import net.pterodactylus.sone.core.FreenetInterface.Fetched; import net.pterodactylus.sone.core.FreenetInterface.InsertToken; +import net.pterodactylus.sone.core.FreenetInterface.InsertTokenSupplier; import net.pterodactylus.sone.core.event.ImageInsertStartedEvent; import net.pterodactylus.sone.data.Image; import net.pterodactylus.sone.data.ImageImpl; @@ -337,4 +338,11 @@ public class FreenetInterfaceTest { assertThat(fetched.getFetchResult(), is(fetchResult)); } + @Test + public void insertTokenSupplierSuppliesInsertTokens() { + InsertTokenSupplier insertTokenSupplier = freenetInterface.new InsertTokenSupplier(); + Image image = mock(Image.class); + assertThat(insertTokenSupplier.apply(image), notNullValue()); + } + }