From 96330fb57ebdb635461ff6b07e7833f7c4cb7bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Aguilera?= Date: Thu, 1 Oct 2015 08:33:03 +0200 Subject: [PATCH] added JUnitParams to readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 9e1790c..0b06e42 100644 --- a/README.md +++ b/README.md @@ -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