1 package org.apache.maven.doxia.site.decoration.inheritance;
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
25
26
27
28
29
30
31 public class Doxia91Test
32 extends TestCase
33 {
34 public void testOldPathNull()
35 throws Exception
36 {
37 PathDescriptor oldPath = new PathDescriptor( null );
38 PathDescriptor newPath = new PathDescriptor( "http://www.apache.org/" );
39
40 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
41
42 assertEquals( diff, oldPath );
43 }
44
45 public void testNewPathNull()
46 throws Exception
47 {
48 PathDescriptor oldPath = new PathDescriptor( "http://www.apache.org/", "file:///home/henning/foo" );
49 PathDescriptor newPath = new PathDescriptor( null );
50
51 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
52
53 assertEquals( diff, oldPath );
54 }
55
56 public void testBothPathNull()
57 throws Exception
58 {
59 PathDescriptor oldPath = new PathDescriptor( null );
60 PathDescriptor newPath = new PathDescriptor( null );
61
62 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
63
64 assertEquals( diff, oldPath );
65 }
66 }