This repository was archived by the owner on Jul 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
main/resources/META-INF/jqassistant-rules
test/java/com/buschmais/jqassistant/plugin/junit/test Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 161161 ]]> </cypher >
162162 </concept >
163163
164+ <concept id =" junit4:InnerTestClass" >
165+ <requiresConcept refId =" junit4:TestClass" />
166+ <description >Labels inner types of types labeled with "Test" with "Test" and "Inner".</description >
167+ <cypher ><![CDATA[
168+ MATCH
169+ (source:Type:Junit4:Test)-[:DECLARES]->(target:Type)
170+ SET
171+ target:Junit4:Test:Inner
172+ RETURN
173+ target
174+ ]]> </cypher >
175+ </concept >
176+
164177</jqa : jqassistant-rules >
Original file line number Diff line number Diff line change @@ -244,4 +244,17 @@ public void defaultGroup() throws RuleException {
244244 Map <String , Result <Constraint >> constraintViolations = reportPlugin .getConstraintResults ();
245245 assertThat (constraintViolations , anEmptyMap ());
246246 }
247+
248+ /**
249+ * Verifies the concept "junit4:InnerTestClass"
250+ */
251+ @ Test
252+ public void innerTestClass () throws RuleException {
253+ scanClasses (TestClass .class );
254+ Result result = applyConcept ("junit4:InnerTestClass" );
255+ assertThat (result .getStatus (), equalTo (SUCCESS ));
256+ store .beginTransaction ();
257+ assertThat (query ("MATCH (c:Type:Junit4:Test:Inner) RETURN c" ).getColumn ("c" ), hasItem (typeDescriptor (TestClass .InnerTestClass .class )));
258+ store .commitTransaction ();
259+ }
247260}
Original file line number Diff line number Diff line change @@ -31,4 +31,7 @@ public void after() {
3131 public static void afterClass () {
3232 }
3333
34+ public class InnerTestClass {
35+ }
36+
3437}
You can’t perform that action at this time.
0 commit comments