Skip to content

Commit c7e5ae2

Browse files
authored
Merge pull request #10 from jqassistant-plugin/5-orgmockitomockedstaticverify-not-recognized-as-assertion
updated concept ids to use the prefix "java-testing" and update README.adoc
2 parents b28276e + 36d69a0 commit c7e5ae2

File tree

12 files changed

+26
-16
lines changed

12 files changed

+26
-16
lines changed

README.adoc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@
33
This is the Java Testing Plugin for https://jqassistant.org[jQAssistant].
44
For more information on jQAssistant see https://jqassistant.org[^].
55

6-
== Usage
6+
It provides concepts for several Java frameworks that provide testing APIs, e.g.
7+
8+
* AssertJ
9+
* Camunda BPMN
10+
* Mockito
11+
* Project Reactor
12+
* XMLUnit
713
8-
To be able to use the plug-in, it must be specified as a plug-in to jQAssistant.
14+
The concepts identify assertion methods and provide to the concept `java:AssertMethod`.
15+
They are activated automatically if the latter concept is used, e.g. by a constraint.
16+
17+
== Usage
918

19+
To be able to use the plugin, it must be declared in the jQAssistant configuration;
1020

1121
[source,yaml]
1222
..jqassistant.yml
@@ -15,5 +25,5 @@ jqassistant:
1525
plugins:
1626
- group-id: org.jqassistant.plugin
1727
artifact-id: jqassistant-java-testing-plugin
18-
version: 1.0.0-SNAPSHOT
28+
version: 1.0.0
1929
----

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jqassistant.plugin</groupId>
77
<artifactId>parent</artifactId>
8-
<version>2.8.0</version>
8+
<version>2.9.0-M3</version>
99
<relativePath/>
1010
</parent>
1111

src/main/resources/META-INF/jqassistant-rules/assertj.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">
44

5-
<concept id="assertj:AssertMethod">
5+
<concept id="java-testing-assertj:AssertMethod">
66
<providesConcept refId="java:AssertMethod"/>
77
<description>
88
Sets labels :Assert and :AssertJ for AssertJ assert methods.

src/main/resources/META-INF/jqassistant-rules/camunda-bpmn.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">
44

5-
<concept id="camunda-bpmn:AssertMethod">
5+
<concept id="java-testing-camunda-bpmn:AssertMethod">
66
<providesConcept refId="java:AssertMethod"/>
77
<description>
88
Sets labels :Assert and :Camunda for Camunda BPMN assert methods.

src/main/resources/META-INF/jqassistant-rules/mockito.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">
44

5-
<concept id="mockito:VerifyMethod">
5+
<concept id="java-testing-mockito:VerifyMethod">
66
<providesConcept refId="java:AssertMethod"/>
77
<description>
88
Sets labels :Assert and :Mockito for Mockito verify methods.
@@ -22,7 +22,7 @@
2222
]]></cypher>
2323
</concept>
2424

25-
<concept id="mockito:BddThenShouldMethod">
25+
<concept id="java-testing-mockito:BddThenShouldMethod">
2626
<providesConcept refId="java:AssertMethod"/>
2727
<description>
2828
Sets labels :Assert and :Mockito for BDDMockito then-should methods.

src/main/resources/META-INF/jqassistant-rules/projectreactor.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">
44

5-
<concept id="projectreactor:AssertMethod">
5+
<concept id="java-testing-projectreactor:AssertMethod">
66
<providesConcept refId="java:AssertMethod"/>
77
<description>
88
Sets labels :Assert and :ProjectReactor for Project Reactor assert methods.

src/main/resources/META-INF/jqassistant-rules/xmlunit-assertj.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">
44

5-
<concept id="xmlunit-assertj:AssertMethod">
5+
<concept id="java-testing-xmlunit-assertj:AssertMethod">
66
<providesConcept refId="java:AssertMethod"/>
77
<description>
88
Sets labels :Assert and :AssertJ for xmlunit-assertj assert methods.

src/test/java/org/jqassistant/plugin/java_testing/concept/AssertJIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AssertJIT extends AbstractJavaPluginIT {
2626
void assertjAssertMethod() throws Exception {
2727
scanClasses(AssertExample.class);
2828

29-
final Result<Concept> conceptResult = applyConcept("assertj:AssertMethod");
29+
final Result<Concept> conceptResult = applyConcept("java-testing-assertj:AssertMethod");
3030
assertThat(conceptResult.getStatus()).isEqualTo(SUCCESS);
3131

3232
store.beginTransaction();

src/test/java/org/jqassistant/plugin/java_testing/concept/CamundaIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class CamundaIT extends AbstractJavaPluginIT {
2727
void camundaAssertMethodTest() throws Exception {
2828
scanClasses(AssertExample.class);
2929

30-
final Result<Concept> conceptResult = applyConcept("camunda-bpmn:AssertMethod");
30+
final Result<Concept> conceptResult = applyConcept("java-testing-camunda-bpmn:AssertMethod");
3131
assertThat(conceptResult.getStatus()).isEqualTo(SUCCESS);
3232

3333
store.beginTransaction();

src/test/java/org/jqassistant/plugin/java_testing/concept/MockitoIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MockitoIT extends AbstractJavaPluginIT {
2828
void mockitoVerifyMethod() throws Exception {
2929
scanClasses(AssertExample.class);
3030

31-
final Result<Concept> conceptResult = applyConcept("mockito:VerifyMethod");
31+
final Result<Concept> conceptResult = applyConcept("java-testing-mockito:VerifyMethod");
3232
assertThat(conceptResult.getStatus()).isEqualTo(SUCCESS);
3333

3434
store.beginTransaction();
@@ -59,7 +59,7 @@ void mockitoVerifyMethod() throws Exception {
5959
void bddMockitoThenShouldMethod() throws Exception {
6060
scanClasses(AssertExample.class);
6161

62-
final Result<Concept> conceptResult = applyConcept("mockito:BddThenShouldMethod");
62+
final Result<Concept> conceptResult = applyConcept("java-testing-mockito:BddThenShouldMethod");
6363
assertThat(conceptResult.getStatus()).isEqualTo(SUCCESS);
6464

6565
store.beginTransaction();

0 commit comments

Comments
 (0)