mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-03 17:52:30 +02:00
Update AttemptCounterTest.java
This commit is contained in:
parent
0f0247f006
commit
1d9112ec63
@ -67,7 +67,7 @@ class AttemptCounterTest {
|
|||||||
@Test
|
@Test
|
||||||
@DisplayName(
|
@DisplayName(
|
||||||
"increment(): increases attemptCount and updates lastAttemptTime (not less than"
|
"increment(): increases attemptCount and updates lastAttemptTime (not less than"
|
||||||
+ " before)")
|
+ " before)")
|
||||||
void increment_shouldIncreaseCountAndUpdateTime() {
|
void increment_shouldIncreaseCountAndUpdateTime() {
|
||||||
AttemptCounter counter = new AttemptCounter();
|
AttemptCounter counter = new AttemptCounter();
|
||||||
long prevTime = counter.getLastAttemptTime();
|
long prevTime = counter.getLastAttemptTime();
|
||||||
@ -127,7 +127,7 @@ class AttemptCounterTest {
|
|||||||
@Test
|
@Test
|
||||||
@DisplayName(
|
@DisplayName(
|
||||||
"returns FALSE when time difference is exactly equal to window (implementation uses"
|
"returns FALSE when time difference is exactly equal to window (implementation uses"
|
||||||
+ " '>')")
|
+ " '>')")
|
||||||
void shouldReturnFalseWhenExactlyWindow() {
|
void shouldReturnFalseWhenExactlyWindow() {
|
||||||
AttemptCounter counter = new AttemptCounter();
|
AttemptCounter counter = new AttemptCounter();
|
||||||
long window = 200L;
|
long window = 200L;
|
||||||
@ -188,7 +188,7 @@ class AttemptCounterTest {
|
|||||||
@Test
|
@Test
|
||||||
@DisplayName(
|
@DisplayName(
|
||||||
"Multiple increments(): Count increases monotonically and timestamp remains"
|
"Multiple increments(): Count increases monotonically and timestamp remains"
|
||||||
+ " monotonically non-decreasing")
|
+ " monotonically non-decreasing")
|
||||||
void multipleIncrements_shouldIncreaseMonotonically() {
|
void multipleIncrements_shouldIncreaseMonotonically() {
|
||||||
AttemptCounter counter = new AttemptCounter();
|
AttemptCounter counter = new AttemptCounter();
|
||||||
long t1 = counter.getLastAttemptTime();
|
long t1 = counter.getLastAttemptTime();
|
||||||
@ -232,6 +232,6 @@ class AttemptCounterTest {
|
|||||||
Integer.MIN_VALUE,
|
Integer.MIN_VALUE,
|
||||||
counter.getAttemptCount(),
|
counter.getAttemptCount(),
|
||||||
"After increment past MAX_VALUE, int overflows to MIN_VALUE (Java standard"
|
"After increment past MAX_VALUE, int overflows to MIN_VALUE (Java standard"
|
||||||
+ " behavior)");
|
+ " behavior)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user