Skip to content

add JUnitParams to your resources list #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -690,6 +690,21 @@ assertThat(some.testMethod()).hasSize(4)

This fluent interface makes your tests more readable. What more could you want?

#### JUnitParams

[JUnitParams](https://pragmatists.github.io/JUnitParams/) project adds a new runner to JUnit and provides much easier and readable parametrised tests for JUnit >=4.6.

The following example shows how you can create a parametrised test. Note that there is not a large difference between a standard JUnit test and a parametrised one.

```
@Test
@Parameters({"17, false",
"22, true" })
public void personIsAdult(int age, boolean valid) throws Exception {
assertThat(new Person(age).isAdult(), is(valid));
}
```

## Tools

### IntelliJ IDEA