From: David ‘Bombe’ Roden Date: Tue, 24 Jun 2014 17:33:10 +0000 (+0200) Subject: Add own test for starting state. X-Git-Tag: 0.9-rc1^2~3^2~237 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b772949af7dcc12a91f1a11dfbfe02d64f1d3050;p=Sone.git Add own test for starting state. --- diff --git a/src/test/java/net/pterodactylus/sone/core/SoneModificationDetectorTest.java b/src/test/java/net/pterodactylus/sone/core/SoneModificationDetectorTest.java index 3e4da70..fec97b1 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneModificationDetectorTest.java +++ b/src/test/java/net/pterodactylus/sone/core/SoneModificationDetectorTest.java @@ -44,9 +44,13 @@ public class SoneModificationDetectorTest { } @Test - public void modifiedSoneIsEligibleAfter60Seconds() { + public void sonesStartOutAsNotEligible() { assertThat(soneModificationDetector.isModified(), is(false)); assertThat(soneModificationDetector.isEligibleForInsert(), is(false)); + } + + @Test + public void modifiedSoneIsEligibleAfter60Seconds() { modifySone(); assertThat(soneModificationDetector.isModified(), is(true)); assertThat(soneModificationDetector.isEligibleForInsert(), is(false)); @@ -75,7 +79,6 @@ public class SoneModificationDetectorTest { @Test public void settingFingerprintWillResetTheEligibility() { - assertThat(soneModificationDetector.isEligibleForInsert(), is(false)); modifySone(); assertThat(soneModificationDetector.isEligibleForInsert(), is(false)); passTime(100); @@ -86,7 +89,6 @@ public class SoneModificationDetectorTest { @Test public void changingInsertionDelayWillInfluenceEligibility() { - assertThat(soneModificationDetector.isEligibleForInsert(), is(false)); modifySone(); assertThat(soneModificationDetector.isEligibleForInsert(), is(false)); passTime(100);