1 package org.apache.maven.doxia.site.decoration;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import junit.framework.TestCase;
23
24 public class DecorationUtilsTest
25 extends TestCase
26 {
27 public void testIsLink()
28 {
29 assertFalse( DecorationUtils.isLink( null ) );
30 assertFalse( DecorationUtils.isLink( "" ) );
31 assertFalse( DecorationUtils.isLink( " " ) );
32 assertTrue( DecorationUtils.isLink( "http://maven.apache.org/" ) );
33 assertTrue( DecorationUtils.isLink( "https://maven.apache.org/" ) );
34 assertTrue( DecorationUtils.isLink( "ftp://maven.apache.org/pub/" ) );
35 assertTrue( DecorationUtils.isLink( "file:///home" ) );
36 assertTrue( DecorationUtils.isLink( "mailto:toto@maven.org" ) );
37 assertTrue( DecorationUtils.isLink( "any-protocol://" ) );
38 }
39 }