From e1fecb450747154118bb7d2e13e0fada86c42da8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Aug 2014 02:22:30 +0200 Subject: [PATCH] Add unit test for the insert token supplier. --- .../java/net/pterodactylus/sone/core/FreenetInterfaceTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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()); + } + } -- 2.7.4