1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util;
17
18 import static org.junit.Assert.assertEquals;
19 import static org.junit.Assert.assertFalse;
20 import static org.junit.Assert.assertTrue;
21
22 import org.junit.Test;
23
24 public class AsciiTest {
25
26 @Test
27 public void test() {
28 assertTrue(Ascii.isDigit('0'));
29 assertFalse(Ascii.isDigit('a'));
30 assertFalse(Ascii.isLowerCase('Z'));
31 assertFalse(Ascii.isLowerCase((char) 0));
32 assertFalse(Ascii.isLowerCase((char) 500));
33 assertTrue(Ascii.isLetter('a'));
34 assertTrue(Ascii.isLetter('A'));
35 assertFalse(Ascii.isLetter('0'));
36 assertEquals('0', Ascii.flip('5'));
37 assertEquals('5', Ascii.flip('0'));
38 assertEquals('a', Ascii.flip('n'));
39 assertEquals('n', Ascii.flip('a'));
40 assertEquals('A', Ascii.flip('N'));
41 assertEquals('N', Ascii.flip('A'));
42 }
43
44 }