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
35 public void testOldPathNull()
36 throws Exception
37 {
38 PathDescriptor oldPath = new PathDescriptor( null );
39 PathDescriptor newPath = new PathDescriptor( "http://www.apache.org/" );
40
41 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
42
43 assertEquals( diff, oldPath );
44 }
45
46
47 public void testNewPathNull()
48 throws Exception
49 {
50 PathDescriptor oldPath = new PathDescriptor( "http://www.apache.org/", "file:///home/henning/foo" );
51 PathDescriptor newPath = new PathDescriptor( null );
52
53 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
54
55 assertEquals( diff, oldPath );
56 }
57
58
59 public void testBothPathNull()
60 throws Exception
61 {
62 PathDescriptor oldPath = new PathDescriptor( null );
63 PathDescriptor newPath = new PathDescriptor( null );
64
65 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
66
67 assertEquals( diff, oldPath );
68 }
69 }