|
1 | 1 | package us.brianolsen.instructions; |
2 | 2 |
|
| 3 | +import org.junit.AfterClass; |
| 4 | +import org.junit.BeforeClass; |
3 | 5 | import org.junit.Test; |
4 | 6 |
|
5 | | -//Only test specific fixtures in interest of avoiding too many files open bug until a solution is found. |
6 | 7 | public class OSRMTextInstructionsFixturesTest extends BaseTest { |
| 8 | + private static OSRMTextInstructions osrmTextInstructions; |
| 9 | + |
| 10 | + @BeforeClass |
| 11 | + public static void setupClass() { |
| 12 | + osrmTextInstructions = new OSRMTextInstructions(VERSION); |
| 13 | + } |
| 14 | + |
| 15 | + @AfterClass |
| 16 | + public static void teardownClass() { |
| 17 | + osrmTextInstructions.close(); |
| 18 | + } |
7 | 19 |
|
8 | 20 | @Test |
9 | 21 | public void testFixturesMatchGeneratedArriveInstructions() { |
10 | | - testFixture("arrive"); |
| 22 | + testFixture("arrive", osrmTextInstructions); |
| 23 | + } |
| 24 | + |
| 25 | + // @Test fails due to mismatching expected (from parent project) |
| 26 | + public void testFixturesMatchGeneratedArriveWaypointInstructions() { |
| 27 | + testFixture("arrive_waypoint", osrmTextInstructions); |
| 28 | + } |
| 29 | + |
| 30 | + @Test |
| 31 | + public void testFixturesMatchGeneratedArriveWaypointLastInstructions() { |
| 32 | + testFixture("arrive_waypoint_last", osrmTextInstructions); |
11 | 33 | } |
12 | 34 |
|
13 | | - // // @Test fails |
14 | | - // public void testFixturesMatchGeneratedArriveWaypointInstructions() { |
15 | | - // testFixture("arrive_waypoint"); |
16 | | - // } |
17 | | - // |
18 | | - // @Test |
19 | | - // public void testFixturesMatchGeneratedArriveWaypointLastInstructions() { |
20 | | - // testFixture("arrive_waypoint_last"); |
21 | | - // } |
22 | | - // |
23 | | - // // @Test fails |
24 | | - // public void testFixturesMatchGeneratedContinueInstructions() { |
25 | | - // testFixture("continue"); |
26 | | - // } |
| 35 | + // @Test fails due to mismatching expected (from parent project) |
| 36 | + public void testFixturesMatchGeneratedContinueInstructions() { |
| 37 | + testFixture("continue", osrmTextInstructions); |
| 38 | + } |
27 | 39 |
|
28 | 40 | @Test |
29 | 41 | public void testFixturesMatchGeneratedDepartInstructions() { |
30 | | - testFixture("depart"); |
31 | | - } |
32 | | - |
33 | | - // @Test |
34 | | - // public void testFixturesMatchGeneratedEndOfRoadInstructions() { |
35 | | - // testFixture("end_of_road"); |
36 | | - // } |
37 | | - // |
38 | | - // @Test |
39 | | - // public void testFixturesMatchGeneratedExitRotaryInstructions() { |
40 | | - // testFixture("exit_rotary"); |
41 | | - // } |
42 | | - // |
43 | | - // @Test |
44 | | - // public void testFixturesMatchGeneratedExitRoundaboutInstructions() { |
45 | | - // testFixture("exit_roundabout"); |
46 | | - // } |
47 | | - // |
48 | | - // @Test |
49 | | - // public void testFixturesMatchGeneratedForkInstructions() { |
50 | | - // testFixture("fork"); |
51 | | - // } |
52 | | - // |
53 | | - // @Test |
54 | | - // public void testFixturesMatchGeneratedMergeInstructions() { |
55 | | - // testFixture("merge"); |
56 | | - // } |
57 | | - // |
58 | | - // @Test |
59 | | - // public void testFixturesMatchGeneratedModesInstructions() { |
60 | | - // testFixture("modes"); |
61 | | - // } |
62 | | - // |
63 | | - // @Test |
64 | | - // public void testFixturesMatchGeneratedNewNameInstructions() { |
65 | | - // testFixture("new_name"); |
66 | | - // } |
67 | | - // |
68 | | - // @Test |
69 | | - // public void testFixturesMatchGeneratedNotificationInstructions() { |
70 | | - // testFixture("notification"); |
71 | | - // } |
72 | | - // |
73 | | - // // @Test fail |
74 | | - // public void testFixturesMatchGeneratedOffRampInstructions() { |
75 | | - // testFixture("off_ramp"); |
76 | | - // } |
77 | | - // |
78 | | - // @Test |
79 | | - // public void testFixturesMatchGeneratedOnRampInstructions() { |
80 | | - // testFixture("on_ramp"); |
81 | | - // } |
82 | | - // |
83 | | - // // @Test fail |
84 | | - // public void testFixturesMatchGeneratedOtherInstructions() { |
85 | | - // testFixture("other"); |
86 | | - // } |
87 | | - // |
88 | | - // @Test |
89 | | - // public void testFixturesMatchGeneratedPhraseInstructions() { |
90 | | - // testFixture("phrase"); |
91 | | - // } |
92 | | - // |
93 | | - // @Test |
94 | | - // public void testFixturesMatchGeneratedRotaryInstructions() { |
95 | | - // testFixture("rotary"); |
96 | | - // } |
97 | | - // |
98 | | - // @Test |
99 | | - // public void testFixturesMatchGeneratedRoundaboutInstructions() { |
100 | | - // testFixture("roundabout"); |
101 | | - // } |
102 | | - // |
103 | | - // @Test |
104 | | - // public void testFixturesMatchGeneratedRoundaboutTurnInstructions() { |
105 | | - // testFixture("roundabout_turn"); |
106 | | - // } |
| 42 | + testFixture("depart", osrmTextInstructions); |
| 43 | + } |
| 44 | + |
| 45 | + @Test |
| 46 | + public void testFixturesMatchGeneratedEndOfRoadInstructions() { |
| 47 | + testFixture("end_of_road", osrmTextInstructions); |
| 48 | + } |
| 49 | + |
| 50 | + @Test |
| 51 | + public void testFixturesMatchGeneratedExitRotaryInstructions() { |
| 52 | + testFixture("exit_rotary", osrmTextInstructions); |
| 53 | + } |
| 54 | + |
| 55 | + @Test |
| 56 | + public void testFixturesMatchGeneratedExitRoundaboutInstructions() { |
| 57 | + testFixture("exit_roundabout", osrmTextInstructions); |
| 58 | + } |
| 59 | + |
| 60 | + @Test |
| 61 | + public void testFixturesMatchGeneratedForkInstructions() { |
| 62 | + testFixture("fork", osrmTextInstructions); |
| 63 | + } |
| 64 | + |
| 65 | + @Test |
| 66 | + public void testFixturesMatchGeneratedMergeInstructions() { |
| 67 | + testFixture("merge", osrmTextInstructions); |
| 68 | + } |
| 69 | + |
| 70 | + @Test |
| 71 | + public void testFixturesMatchGeneratedModesInstructions() { |
| 72 | + testFixture("modes", osrmTextInstructions); |
| 73 | + } |
| 74 | + |
| 75 | + @Test |
| 76 | + public void testFixturesMatchGeneratedNewNameInstructions() { |
| 77 | + testFixture("new_name", osrmTextInstructions); |
| 78 | + } |
| 79 | + |
| 80 | + @Test |
| 81 | + public void testFixturesMatchGeneratedNotificationInstructions() { |
| 82 | + testFixture("notification", osrmTextInstructions); |
| 83 | + } |
| 84 | + |
| 85 | + // @Test fails due to mismatching expected (from parent project) |
| 86 | + public void testFixturesMatchGeneratedOffRampInstructions() { |
| 87 | + testFixture("off_ramp", osrmTextInstructions); |
| 88 | + } |
| 89 | + |
| 90 | + @Test |
| 91 | + public void testFixturesMatchGeneratedOnRampInstructions() { |
| 92 | + testFixture("on_ramp", osrmTextInstructions); |
| 93 | + } |
| 94 | + |
| 95 | + // @Test fails due to mismatching expected (from parent project) |
| 96 | + public void testFixturesMatchGeneratedOtherInstructions() { |
| 97 | + testFixture("other", osrmTextInstructions); |
| 98 | + } |
| 99 | + |
| 100 | + @Test |
| 101 | + public void testFixturesMatchGeneratedRotaryInstructions() { |
| 102 | + testFixture("rotary", osrmTextInstructions); |
| 103 | + } |
| 104 | + |
| 105 | + @Test |
| 106 | + public void testFixturesMatchGeneratedRoundaboutInstructions() { |
| 107 | + testFixture("roundabout", osrmTextInstructions); |
| 108 | + } |
| 109 | + |
| 110 | + @Test |
| 111 | + public void testFixturesMatchGeneratedRoundaboutTurnInstructions() { |
| 112 | + testFixture("roundabout_turn", osrmTextInstructions); |
| 113 | + } |
107 | 114 |
|
108 | 115 | @Test |
109 | 116 | public void testFixturesMatchGeneratedTurnInstructions() { |
110 | | - testFixture("turn"); |
| 117 | + testFixture("turn", osrmTextInstructions); |
111 | 118 | } |
112 | 119 |
|
113 | | - // @Test |
114 | | - // public void testFixturesMatchGeneratedUseLaneInstructions() { |
115 | | - // testFixture("use_lane"); |
116 | | - // } |
| 120 | + @Test |
| 121 | + public void testFixturesMatchGeneratedUseLaneInstructions() { |
| 122 | + testFixture("use_lane", osrmTextInstructions); |
| 123 | + } |
117 | 124 |
|
118 | 125 | } |
0 commit comments