Skip to content

Commit

Permalink
Update guice-junit
Browse files Browse the repository at this point in the history
  • Loading branch information
amanteaux committed Nov 21, 2024
1 parent 8b7943a commit 51c2aa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plume-framework-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<junit.version>5.11.3</junit.version>
<assertj.version>3.26.3</assertj.version>
<mockito.version>5.14.2</mockito.version>
<guice-junit.version>1.0.0</guice-junit.version>
<guice-junit.version>1.0.1</guice-junit.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,15 @@ void executeWithConstantTime__when_functionExecuted__should_useCurrentInstantTem
}

@Test
void setTickingClockFromInstant__when_instantProvided__should_setOffsetClock() {
void setTickingClockFromInstant__when_instantProvided__should_setOffsetClock() throws InterruptedException {
// Arrange
MockedClock mockedClock = new MockedClock();
Instant futureInstant = Instant.now().plusSeconds(10);

// Act
mockedClock.setTickingClockFromInstant(futureInstant);
Thread.sleep(1);

// Assert
Instant now = Instant.now();
assertThat(mockedClock.instant()).isBetween(now, futureInstant);
assertThat(mockedClock.instant()).isAfter(futureInstant);
}
}

0 comments on commit 51c2aa5

Please sign in to comment.