Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amanteaux committed Nov 18, 2024
1 parent 0a483cc commit d5fa115
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plume-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,20 @@ Included dependencies:
- Test assertions done in a fluent and more readable way: [Assertj](https://github.com/assertj/assertj)
- To create quick mocks: [Mockito](https://github.com/mockito/mockito)
- Integration tests with Guice: [Guice-junit](https://github.com/Coreoz/Guice-Junit)

Sample usage of `MockedClock` with Guice to create a test module that overrides the default `Clock`:
```java
public class TestModule extends AbstractModule {
@Override
protected void configure() {
install(Modules.override(new ApplicationModule()).with(new AbstractModule() {
@Override
protected void configure() {
bind(Clock.class).to(MockedClock.class);
}
}));
}
}
```

This module can then be used with the `@GuiceTest` annotation. See [Guice JUnit documentation](https://github.com/Coreoz/Guice-Junit#getting-started) for details.

0 comments on commit d5fa115

Please sign in to comment.