From: David ‘Bombe’ Roden Date: Mon, 21 Oct 2013 04:50:16 +0000 (+0200) Subject: Verify that a Sone with a too large protocol version will not be parsed. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=21cc44abe8ffbd1e6d129c2b6141085f0694c5eb;p=Sone.git Verify that a Sone with a too large protocol version will not be parsed. --- diff --git a/src/test/java/net/pterodactylus/sone/core/SoneParserTest.java b/src/test/java/net/pterodactylus/sone/core/SoneParserTest.java index dbc0d10..06637c3 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneParserTest.java +++ b/src/test/java/net/pterodactylus/sone/core/SoneParserTest.java @@ -56,6 +56,11 @@ public class SoneParserTest { } @Test + public void verifyThatATooLargeProtocolVersionCausesAnError() throws SoneException { + assertThat(soneParser.parseSone(database, originalSone, soneXmlBuilder.setProtocolVersion("1").get()), nullValue()); + } + + @Test public void verifyThatAMissingClientCausesTheOriginalClientToBeUsed() throws SoneException { Sone sone = soneParser.parseSone(database, originalSone, soneXmlBuilder.removeClientInformation().get()); assertThat(sone, notNullValue());