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 org.junit.Test;
23
24 import static org.junit.Assert.assertEquals;
25
26
27
28
29
30
31
32 public class Doxia91Test
33 {
34
35 @Test
36 public void testOldPathNull()
37 throws Exception
38 {
39 PathDescriptor oldPath = new PathDescriptor( null );
40 PathDescriptor newPath = new PathDescriptor( "http://www.apache.org/" );
41
42 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
43
44 assertEquals( diff, oldPath );
45 }
46
47
48 @Test
49 public void testNewPathNull()
50 throws Exception
51 {
52 PathDescriptor oldPath = new PathDescriptor( "http://www.apache.org/", "file:///home/henning/foo" );
53 PathDescriptor newPath = new PathDescriptor( null );
54
55 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
56
57 assertEquals( diff, oldPath );
58 }
59
60
61 @Test
62 public void testBothPathNull()
63 throws Exception
64 {
65 PathDescriptor oldPath = new PathDescriptor( null );
66 PathDescriptor newPath = new PathDescriptor( null );
67
68 PathDescriptor diff = PathUtils.convertPath( oldPath, newPath );
69
70 assertEquals( diff, oldPath );
71 }
72 }