From b772949af7dcc12a91f1a11dfbfe02d64f1d3050 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 24 Jun 2014 19:33:10 +0200 Subject: [PATCH] Add own test for starting state. --- .../net/pterodactylus/sone/core/SoneModificationDetectorTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.7.4