From 6d9add74f45486ca976c63180cf1c8296a67e66e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Nov 2019 18:59:17 +0100 Subject: [PATCH] =?utf8?q?=E2=9C=85=20Add=20tests=20for=20WOTC.addContext?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../sone/freenet/wot/WebOfTrustConnectorTest.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt index 84f1f98..35a5ffb 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt @@ -155,6 +155,18 @@ class WebOfTrustConnectorTest { )) } + @Test + fun `adding a context sends the correct own identity id`() { + createPluginConnector("AddContext", hasField("Identity", equalTo(ownIdentity.id))) + .connect { addContext(ownIdentity, "TestContext") } + } + + @Test + fun `adding a context sends the correct context`() { + createPluginConnector("AddContext", hasField("Context", equalTo("TestContext"))) + .connect { addContext(ownIdentity, "TestContext") } + } + } private fun PluginConnector.connect(block: WebOfTrustConnector.() -> R) = -- 2.7.4