samples/consistency/src-test/impl/ConsistencyOfURLTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
     1 package impl;
     2 
     3 import java.net.URL;
     4 import org.junit.Test;
     5 import static org.junit.Assert.assertEquals;
     6 
     7 /**
     8  *
     9  * @author Jaroslav Tulach <jtulach@netbeans.org>
    10  */
    11 public class ConsistencyOfURLTest {
    12 
    13     @Test public void urlToExternalAndToString() throws Exception {
    14         // BEGIN: consistency.url
    15         URL url = new URL("http://www.apidesign.org");
    16         assertEquals(url.toString(), url.toExternalForm());
    17         // END: consistency.url
    18     }
    19     
    20 }