1
1
package org .unicode .cldr .util ;
2
2
3
3
import static org .junit .jupiter .api .Assertions .assertEquals ;
4
+ import static org .junit .jupiter .api .Assertions .assertNotEquals ;
4
5
import static org .junit .jupiter .api .Assertions .assertTrue ;
5
6
import static org .junit .jupiter .api .Assumptions .assumeTrue ;
6
7
@@ -65,6 +66,11 @@ public void TestPathDescriptionLinks(final String url, final String xpath)
65
66
assertURLOK (url , xpath );
66
67
}
67
68
69
+ @ Test
70
+ void testPathDescriptionProvider () {
71
+ assertNotEquals (0 , pathDescriptionProvider ().count ());
72
+ }
73
+
68
74
/**
69
75
* Provider for above test
70
76
*
@@ -83,13 +89,23 @@ public static Stream<Arguments> pathDescriptionProvider() {
83
89
84
90
final Map <String , String > urls = new TreeMap <String , String >();
85
91
92
+ // this gets any URLs that are not in the footer
86
93
for (final String xpath : english .fullIterable ()) {
87
94
final String description = pathDescriptionFactory .getRawDescription (xpath , null );
88
95
// System.out.println(description);
89
96
for (final String url : urlsFromString (description )) {
90
97
urls .putIfAbsent (url , xpath );
91
98
}
92
99
}
100
+
101
+ // this gets all URLs in references
102
+ PathDescriptionParser pathDescriptionParser = new PathDescriptionParser ();
103
+ pathDescriptionParser .parse (PathDescription .getPathDescriptionString ());
104
+ for (final String url : urlsFromString (pathDescriptionParser .getReferences ())) {
105
+ urls .putIfAbsent (url , "PathDescriptions.md" );
106
+ }
107
+
108
+ assertNotEquals (0 , urls .size (), "PathDescription had no urls" );
93
109
return urls .entrySet ().stream ().map (e -> Arguments .of (e .getKey (), e .getValue ()));
94
110
}
95
111
0 commit comments