@Override protected void setUp() throws Exception { parser = new CharsetKVPParser("charset"); }
public void testInvalid() throws Exception { try { parser.parse("invalidCharset"); fail("Should have failed with an exception?"); } catch (UnsupportedCharsetException e) { } } }
public void testUTF8() throws Exception { Charset charset = (Charset) parser.parse("UTF-8"); assertNotNull(charset); assertEquals(Charset.forName("UTF-8"), charset); }