Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 13 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
This is the Java Testing Plugin for https://jqassistant.org[jQAssistant].
For more information on jQAssistant see https://jqassistant.org[^].

== Usage
It provides concepts for several Java frameworks that provide testing APIs, e.g.

* AssertJ
* Camunda BPMN
* Mockito
* Project Reactor
* XMLUnit

To be able to use the plug-in, it must be specified as a plug-in to jQAssistant.
The concepts identify assertion methods and provide to the concept `java:AssertMethod`.
They are activated automatically if the latter concept is used, e.g. by a constraint.

== Usage

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

[source,yaml]
..jqassistant.yml
Expand All @@ -15,5 +25,5 @@ jqassistant:
plugins:
- group-id: org.jqassistant.plugin
artifact-id: jqassistant-java-testing-plugin
version: 1.0.0-SNAPSHOT
version: 1.0.0
----
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jqassistant.plugin</groupId>
<artifactId>parent</artifactId>
<version>2.8.0</version>
<version>2.9.0-M3</version>
<relativePath/>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/jqassistant-rules/assertj.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">

<concept id="assertj:AssertMethod">
<concept id="java-testing-assertj:AssertMethod">
<providesConcept refId="java:AssertMethod"/>
<description>
Sets labels :Assert and :AssertJ for AssertJ assert methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">

<concept id="camunda-bpmn:AssertMethod">
<concept id="java-testing-camunda-bpmn:AssertMethod">
<providesConcept refId="java:AssertMethod"/>
<description>
Sets labels :Assert and :Camunda for Camunda BPMN assert methods.
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/jqassistant-rules/mockito.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">

<concept id="mockito:VerifyMethod">
<concept id="java-testing-mockito:VerifyMethod">
<providesConcept refId="java:AssertMethod"/>
<description>
Sets labels :Assert and :Mockito for Mockito verify methods.
Expand All @@ -22,7 +22,7 @@
]]></cypher>
</concept>

<concept id="mockito:BddThenShouldMethod">
<concept id="java-testing-mockito:BddThenShouldMethod">
<providesConcept refId="java:AssertMethod"/>
<description>
Sets labels :Assert and :Mockito for BDDMockito then-should methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">

<concept id="projectreactor:AssertMethod">
<concept id="java-testing-projectreactor:AssertMethod">
<providesConcept refId="java:AssertMethod"/>
<description>
Sets labels :Assert and :ProjectReactor for Project Reactor assert methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/rule/v2.2 https://jqassistant.github.io/jqassistant/current/schema/jqassistant-rule-v2.2.xsd">

<concept id="xmlunit-assertj:AssertMethod">
<concept id="java-testing-xmlunit-assertj:AssertMethod">
<providesConcept refId="java:AssertMethod"/>
<description>
Sets labels :Assert and :AssertJ for xmlunit-assertj assert methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AssertJIT extends AbstractJavaPluginIT {
void assertjAssertMethod() throws Exception {
scanClasses(AssertExample.class);

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

store.beginTransaction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CamundaIT extends AbstractJavaPluginIT {
void camundaAssertMethodTest() throws Exception {
scanClasses(AssertExample.class);

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

store.beginTransaction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MockitoIT extends AbstractJavaPluginIT {
void mockitoVerifyMethod() throws Exception {
scanClasses(AssertExample.class);

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

store.beginTransaction();
Expand Down Expand Up @@ -59,7 +59,7 @@ void mockitoVerifyMethod() throws Exception {
void bddMockitoThenShouldMethod() throws Exception {
scanClasses(AssertExample.class);

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

store.beginTransaction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ProjectReactorIT extends AbstractJavaPluginIT {
void projectReactorAssertMethod() throws Exception {
scanClasses(AssertExample.class);

final Result<Concept> conceptResult = applyConcept("projectreactor:AssertMethod");
final Result<Concept> conceptResult = applyConcept("java-testing-projectreactor:AssertMethod");
assertThat(conceptResult.getStatus()).isEqualTo(SUCCESS);

store.beginTransaction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class XmlUnitAssertIT extends AbstractJavaPluginIT {
void xmlAssertMethod() throws Exception {
scanClasses(AssertExample.class);

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

store.beginTransaction();
Expand Down
Loading