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