1
2
3
4
5 package com.qulice.pmd;
6
7 import org.hamcrest.Matchers;
8 import org.junit.jupiter.api.Test;
9
10
11
12
13
14
15
16
17 final class PmdMethodReferencesTest {
18
19 @Test
20 void understandsMethodReferences() throws Exception {
21 new PmdAssert(
22 "UnderstandsMethodReferences.java",
23 Matchers.is(true),
24 Matchers.not(
25 Matchers.containsString("(UnusedPrivateMethod)")
26 )
27 ).assertOk();
28 }
29
30 @Test
31 void ignoresRuleCrashOnMethodReference() throws Exception {
32 new PmdAssert(
33 "UseDiamondOperatorMethodRef.java",
34 Matchers.is(true),
35 Matchers.not(
36 Matchers.containsString("(ProcessingError)")
37 )
38 ).assertOk();
39 }
40 }