samples/consistency/src-test/api/ConsistencyOfURLTest.java
changeset 98 9d2007487823
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/consistency/src-test/api/ConsistencyOfURLTest.java	Sat Jun 14 09:54:18 2008 +0200
     1.3 @@ -0,0 +1,20 @@
     1.4 +package api;
     1.5 +
     1.6 +import java.net.URL;
     1.7 +import org.junit.Test;
     1.8 +import static org.junit.Assert.assertEquals;
     1.9 +
    1.10 +/**
    1.11 + *
    1.12 + * @author Jaroslav Tulach <jtulach@netbeans.org>
    1.13 + */
    1.14 +public class ConsistencyOfURLTest {
    1.15 +
    1.16 +    @Test public void urlToExternalAndToString() throws Exception {
    1.17 +        // BEGIN: consistency.url
    1.18 +        URL url = new URL("http://www.apidesign.org");
    1.19 +        assertEquals(url.toString(), url.toExternalForm());
    1.20 +        // END: consistency.url
    1.21 +    }
    1.22 +    
    1.23 +}