X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FWebOfTrustConnectorTest.kt;h=afde66bbde98ba1db4922c9852beda496e7a94cd;hp=18e9ae9528cf8e428b1c9ebf2d8f1ae0a7101e3d;hb=ed0b70c34c926fbb44ec61c8be9b9b9af26b1770;hpb=d794701018424594ea2f19c894da806a65ccd626 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 18e9ae9..afde66b 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt @@ -179,6 +179,24 @@ class WebOfTrustConnectorTest { .connect { removeContext(ownIdentity, "TestContext") } } + @Test + fun `setting a property sends the correct identity id`() { + createPluginConnector("SetProperty", hasField("Identity", equalTo(ownIdentity.id))) + .connect { setProperty(ownIdentity, "TestProperty", "TestValue") } + } + + @Test + fun `setting a property sends the correct property name`() { + createPluginConnector("SetProperty", hasField("Property", equalTo("TestProperty"))) + .connect { setProperty(ownIdentity, "TestProperty", "TestValue") } + } + + @Test + fun `setting a property sends the correct property value`() { + createPluginConnector("SetProperty", hasField("Value", equalTo("TestValue"))) + .connect { setProperty(ownIdentity, "TestProperty", "TestValue") } + } + } private fun PluginConnector.connect(block: WebOfTrustConnector.() -> R) =