1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.text.lookup;
19
20 import static org.junit.jupiter.api.Assertions.assertEquals;
21
22 import org.apache.commons.lang3.StringUtils;
23 import org.junit.jupiter.api.Test;
24
25
26
27
28 class AbstractStringLookupTest {
29
30 private static final class TestStringLookup extends AbstractStringLookup {
31
32 @Override
33 public String lookup(final String key) {
34
35 return null;
36 }
37
38 }
39
40 @SuppressWarnings("deprecation")
41 @Test
42 void testForwarding_substringAfter() {
43 assertEquals(StringUtils.substringAfterLast("abc", 'a'), new TestStringLookup().substringAfterLast("abc", 'a'));
44 }
45
46 @SuppressWarnings("deprecation")
47 @Test
48 void testForwarding_substringAfterChar() {
49 assertEquals(StringUtils.substringAfter("abc", 'a'), new TestStringLookup().substringAfter("abc", 'a'));
50 }
51
52 @SuppressWarnings("deprecation")
53 @Test
54 void testForwarding_substringAfterString() {
55 assertEquals(StringUtils.substringAfter("abc", "a"), new TestStringLookup().substringAfter("abc", "a"));
56 }
57 }