jqassistant

How to include package into query?

丶灬走出姿态 提交于 2020-01-04 04:16:08
问题 This question is a continuation of How to identify all classes implementing a specific interface that do NOT extend some base class?. The accepted answer there suggests to use: MATCH (i:Interface {name:'Action'} )<-[:IMPLEMENTS|EXTENDS*1..10]- (class), (abstractAction:Class {name:'AbstractAction'}) where not (class)-->(abstractAction) RETURN class That works nicely, and gives a list of classes matching that condition. The only problem I have: the name of that interface Action is (surprise)

JQassistant rule for TestMethods with lambda expressions and consumers asserts

蓝咒 提交于 2019-12-13 03:47:31
问题 Our project has few Unit Tests in which the asserts are passed as a lambda or consumer to the test class. Example as below. How to write a cypher rule constraint such the asserts are identified and the method is not flagged as without assert. Currently using junit4:TestMethodWithoutAssertion Test Method : @Test public void testSuccessfulIdempotency(){ transportConsumerFlow.accept(Mockito.mock(TransRequest.class), (t)->{ assertEquals(t, expectedResponseMessage); }); } In the sample above, the