From: David ‘Bombe’ Roden Date: Mon, 21 Oct 2013 20:23:35 +0000 (+0200) Subject: Test that a missing timestamp causes the Sone not to be parsed. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=36420fb202f9601b75d5e0a57e93aef6964b7b51;p=Sone.git Test that a missing timestamp causes the Sone not to 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 53f11ae..7029048 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneParserTest.java +++ b/src/test/java/net/pterodactylus/sone/core/SoneParserTest.java @@ -72,6 +72,13 @@ public class SoneParserTest { } @Test + public void verifyThatAMissingTimeCausesAnError() { + Optional sone = soneParser.parseSone(database, originalSone, soneXmlBuilder.removeTime().get()); + assertThat(sone, notNullValue()); + assertThat(sone.isPresent(), is(false)); + } + + @Test public void verifyThatAMissingClientCausesTheOriginalClientToBeUsed() { Optional sone = soneParser.parseSone(database, originalSone, soneXmlBuilder.removeClientInformation().get()); assertThat(sone, notNullValue());