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
18 final class PmdArrayIsStoredDirectlyTest {
19
20 @Test
21 void allowsArrayIsStoredDirectlyWhenWrapped() throws Exception {
22 new PmdAssert(
23 "ArrayIsStoredDirectlyWrapped.java",
24 Matchers.any(Boolean.class),
25 Matchers.not(
26 Matchers.containsString("(ArrayIsStoredDirectly)")
27 )
28 ).assertOk();
29 }
30
31 @Test
32 void reportsArrayIsStoredDirectlyWhenPlain() throws Exception {
33 new PmdAssert(
34 "ArrayIsStoredDirectlyPlain.java",
35 Matchers.is(false),
36 Matchers.containsString("(ArrayIsStoredDirectly)")
37 ).assertOk();
38 }
39 }