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 final class PmdRecordClassesTest {
19
20 @Test
21 @EnabledForJreRange(min = JRE.JAVA_21, max = JRE.JAVA_25)
22 void allowsRecordClasses() throws Exception {
23 new PmdAssert(
24 "RecordParsed.java",
25 Matchers.is(true),
26 Matchers.not(
27 Matchers.containsString("Public static methods are prohibited")
28 )
29 ).assertOk();
30 }
31 }