1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.joran.spi;
15
16 import java.util.ArrayList;
17 import java.util.HashSet;
18 import java.util.List;
19 import java.util.Set;
20
21 import org.junit.jupiter.api.Assertions;
22 import org.junit.jupiter.api.Test;
23
24 public class CaseCombinatorTest {
25
26 CaseCombinator p = new CaseCombinator();
27
28 @Test
29 public void smoke() {
30 CaseCombinator p = new CaseCombinator();
31
32 List<String> result = p.combinations("a-B=");
33
34 List<String> witness = new ArrayList<String>();
35 witness.add("a-b=");
36 witness.add("A-b=");
37 witness.add("a-B=");
38 witness.add("A-B=");
39 Assertions.assertEquals(witness, result);
40 }
41
42 @Test
43 public void other() {
44 List<String> result = p.combinations("aBCd");
45 Assertions.assertEquals(16, result.size());
46 Set<String> witness = new HashSet<String>(result);
47
48 Assertions.assertEquals(16, witness.size());
49 }
50 }