META-INF.jqassistant-rules.junit3.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit Show documentation
Show all versions of junit Show documentation
Plugin for jQAssistant to be able to scan and to
analyze JUnit related artifacts.
The newest version!
<jqassistant-rules xmlns="http://schema.jqassistant.org/rule/v1.10"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/rule/v1.10 http://schema.jqassistant.org/rule/jqassistant-rule-v1.10.xsd">
<concept id="junit3:TestClass">
<description>Labels all non-abstract classes extending from junit.framework.TestCase "Test" and "Junit3".</description>
<cypher><![CDATA[
MATCH
(c:Type:Class)-[:EXTENDS*]->(testCaseType:Type)
WHERE
testCaseType.fqn = "junit.framework.TestCase"
SET
c:Test:Junit3
RETURN
c AS TestClass
]]></cypher>
</concept>
<concept id="junit3:TestMethod">
<providesConcept refId="java:TestMethod"/>
<requiresConcept refId="junit3:TestClass"/>
<description>Labels all test methods declared by a test class with "Test" and "Junit3".
</description>
<cypher><![CDATA[
MATCH
(c:Class:Test:Junit3)-[:DECLARES]->(m:Method)
WHERE
m.signature =~ "void test.*\\(.*\\)"
SET
m:Test:Junit3
RETURN
m AS Test, c AS TestClass
]]></cypher>
</concept>
<concept id="junit3:SetUpMethod">
<requiresConcept refId="junit3:TestClass"/>
<description>Labels all setUp methods declared by a test class with "SetUp" and "Junit3".</description>
<cypher><![CDATA[
MATCH
(c:Class:Test:Junit3)-[:DECLARES]->(m:Method)
WHERE
m.signature = "void setUp()"
SET
m:SetUp:Junit3
RETURN
m AS SetUpMethod, c AS TestClass
]]></cypher>
</concept>
<concept id="junit3:TearDownMethod">
<requiresConcept refId="junit3:TestClass"/>
<description>Labels all tearDown methods declared by a test class with "TearDown" and "Junit3".</description>
<cypher><![CDATA[
MATCH
(c:Class:Test:Junit3)-[:DECLARES]->(m:Method)
WHERE
m.signature = "void tearDown()"
SET
m:TearDown:Junit3
RETURN
m AS TearDownMethod, c AS TestClass
]]></cypher>
</concept>
</jqassistant-rules>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy