FileDocCategorySizeDatePackage
URLEncoderTest.javaAPI DocAndroid 1.5 API2092Wed May 06 22:41:04 BST 2009org.apache.harmony.luni.tests.java.net

URLEncoderTest

public class URLEncoderTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtest_encodeLjava_lang_StringLjava_lang_String()

tests
URLEncoder#encode(String, String)

        // Regression for HARMONY-24
        try {
            URLEncoder.encode("str","unknown_enc");
            fail("Assert 0: Should throw UEE for invalid encoding");
        } catch (UnsupportedEncodingException e) {
            // expected
        } 
        //Regression for HARMONY-1233
        try {
            URLEncoder.encode(null, "harmony");
            fail("NullPointerException expected");
        } catch (NullPointerException e) {
            //expected
        }