From: David ‘Bombe’ Roden Date: Tue, 11 Feb 2020 17:01:34 +0000 (+0100) Subject: 🔥 Replace Guava’s ByteStream method with Kotlin method X-Git-Tag: v82^2~82 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e6fa274b4a3fb8a8ae55c1e31fb940ce5878604e;p=Sone.git 🔥 Replace Guava’s ByteStream method with Kotlin method --- diff --git a/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt b/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt index 7ac9e06..4878150 100644 --- a/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt @@ -4,7 +4,6 @@ import com.codahale.metrics.* import com.google.common.base.* import com.google.common.base.Optional import com.google.common.eventbus.* -import com.google.common.io.ByteStreams.* import com.google.common.util.concurrent.MoreExecutors.* import freenet.keys.* import net.pterodactylus.sone.core.SoneInserter.* @@ -210,7 +209,7 @@ class SoneInserterTest { val manifestElement = manifestCreator.createManifestElement("test.txt", "plain/text; charset=utf-8", "sone-inserter-manifest.txt") assertThat(manifestElement!!.name, equalTo("test.txt")) assertThat(manifestElement.mimeTypeOverride, equalTo("plain/text; charset=utf-8")) - val templateContent = String(toByteArray(manifestElement.data.inputStream), Charsets.UTF_8) + val templateContent = String(manifestElement.data.inputStream.readBytes(), Charsets.UTF_8) assertThat(templateContent, containsString("Sone Version: ${SonePlugin.getPluginVersion()}\n")) assertThat(templateContent, containsString("Core Startup: $now\n")) assertThat(templateContent, containsString("Sone ID: SoneId\n"))