Skip to content

Commit

Permalink
Merge 4b096b4 into c011e26
Browse files Browse the repository at this point in the history
  • Loading branch information
boretti committed May 24, 2020
2 parents c011e26 + 4b096b4 commit e0b3db0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,3 +16,4 @@ hs_err_pid*
/.classpath
/.project
/bin/
/velocity.log
32 changes: 30 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
powerunit-extensions-matchers
# powerunit-extensions-matchers


* Travis ci : [![Build Status](https://travis-ci.org/powerunit/powerunit-extensions-matchers.svg?branch=master)](https://travis-ci.org/powerunit/powerunit-extensions-matchers)
Expand All @@ -9,4 +9,32 @@ powerunit-extensions-matchers
* Git : ![mergify-status](https://gh.mergify.io/badges/powerunit/powerunit-extensions-matchers.png?style=cut)


This is an extension to powerunit (a unit test framework for java 8). [Please check the site for more information](http://powerunit.github.io/powerunit-extensions-matchers/).
This is an extension to powerunit (a unit test framework for java 8). [Please check the site for more information](http://powerunit.github.io/powerunit-extensions-matchers/) that doesn't require this framework, but provides generation of hamcrest matchers.

# Usage

Basic usage is to add this libraray as a dependency and use the annotation :

```java
@ProvideMatchers
public class PojoShort {
...
}
```

Matchers classes must be created by the annotation processor (in this example, named `PojoShortMatchers`).

# Compatibility

Powerunit-extensions-matchers version | With | Version | Status
------------------------------------- | ------------- | ------- | -------
0.1.6 | hamcrest | 1.3 | :heavy_check_mark:
0.1.6 | hamcrest | 2.1+ | :grey_question: Not tested by itself, but as some extension use this version, should be OK
0.1.6 | JDK | 1.8 | :heavy_check_mark:
0.1.6 | JDK | 9 | Compilation with source and target = 1.8 tested. The `@Generated` annotation may not be available OOTB and the META-INF information are not generated
0.1.6 | JDK | 10 | Compilation with source and target = 1.8 tested. The `@Generated` annotation may not be available OOTB and the META-INF information are not generated
0.2.0 | hamcrest | 1.3 | :heavy_check_mark: The `@Factory` annotation is not produced or parsed anymore.
0.2.0 | hamcrest | 2.1+ | :heavy_check_mark:
0.2.0 | JDK | 1.8 | :heavy_check_mark:
0.2.0 | JDK | 9 | Compilation with source and target = 1.8 tested. Execution of generated matcher tested. The `@Generated` annotation may not be available OOTB.
0.2.0 | JDK | 10 | Compilation with source and target = 1.8 tested. Execution of generated matcher tested. The `@Generated` annotation may not be available OOTB.
6 changes: 4 additions & 2 deletions src/main/javadoc/overview.html
Expand Up @@ -4,8 +4,7 @@
</head>
<body>
This is an extension to Powerunit to generate matchers for POJO.
<p>
This library provides several annotation processors :
<p>This library provides several annotation processors :
<ul>
<li><b>Processing of the ProvideMatchers annotation.</b><br>This
processor create <code>Matcher</code> for each annotated class, in
Expand Down Expand Up @@ -43,5 +42,8 @@
factory method of the matchers, in the interface defined by this
parameter.</li>
</ul>
<b>The annotation {@code javax.annotation.Generated} is not
available OOTB with recent version of java. You may need to add a
dependency providing it if necessary.</b>
</body>
</html>
15 changes: 15 additions & 0 deletions src/site/fml/faq.fml
Expand Up @@ -110,4 +110,19 @@
</answer>
</faq>
</part>

<part id="Troubleshooting">
<title>Troubleshooting</title>
<faq id="generated">
<question>
Why is the compilation failing because of missing annotation <i>javax.annotation.Generated</i>?
</question>
<answer>
<p>Since version 9 of java, this annotation is not necessary available OOTB. You must add a dependency providing this annotation.
</p>
<p>You may use this dependency <i>javax.annotation:javax.annotation-api</i>
</p>
</answer>
</faq>
</part>
</faqs>

0 comments on commit e0b3db0

Please sign in to comment.