1 25 26 package org.snipsnap.test.commons; 27 28 import junit.framework.Test; 29 import junit.framework.TestSuite; 30 import org.snipsnap.snip.Access; 31 import org.snipsnap.test.snip.SnipTestSupport; 32 33 import java.io.StringWriter ; 34 35 public class UrlTest extends SnipTestSupport { 36 protected StringWriter writer; 37 38 public UrlTest(String name) { 39 super(name); 40 } 41 42 protected void setUp() throws Exception { 43 super.setUp(); 44 } 45 46 public static Test suite() { 47 return new TestSuite(UrlTest.class); 48 } 49 50 public void testLocalhost() { 51 assertTrue("Host is local", !Access.isValidReferrer("http://localhost")); 52 } 53 } 54 | Popular Tags |