1
2
3
4
5 package com.qulice.pmd;
6
7 import org.hamcrest.Matchers;
8 import org.junit.jupiter.api.Test;
9 import org.junit.jupiter.api.condition.EnabledForJreRange;
10 import org.junit.jupiter.api.condition.JRE;
11
12
13
14
15
16
17
18
19 final class PmdRecordClassesTest {
20
21 @Test
22 @EnabledForJreRange(min = JRE.JAVA_21, max = JRE.JAVA_25)
23 void allowsRecordClasses() throws Exception {
24 new PmdAssert(
25 "RecordParsed.java",
26 Matchers.is(true),
27 Matchers.not(
28 Matchers.containsString("Public static methods are prohibited")
29 )
30 ).assertOk();
31 }
32 }