gooby 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. data/README +242 -0
  2. data/bin/example_usage.rb +38 -0
  3. data/bin/tests_gen.rb +16 -0
  4. data/data/20050305_corporate_cup_hm.csv +251 -0
  5. data/data/20050305_corporate_cup_hm.xml +2208 -0
  6. data/data/20050430_nashville_marathon.csv +1208 -0
  7. data/data/20050430_nashville_marathon.xml +10043 -0
  8. data/data/20051119_dowd_ymca_hm.csv +251 -0
  9. data/data/20051119_dowd_ymca_hm.xml +2210 -0
  10. data/data/20051124_hyatt_turkey_trot_8K.csv +321 -0
  11. data/data/20051124_hyatt_turkey_trot_8K.xml +2651 -0
  12. data/data/2007_03_03.tcx +6207 -0
  13. data/data/forerunner_2007.xml +259014 -0
  14. data/data/geo_data.txt +171 -0
  15. data/data/phx.csv +1280 -0
  16. data/data/phx.xml +10620 -0
  17. data/data/run_2007_01_01_16_38_27.xml +2020 -0
  18. data/data/run_2007_01_06_15_27_31.xml +2020 -0
  19. data/data/run_2007_01_10_12_25_47.xml +820 -0
  20. data/data/run_2007_01_10_22_44_54.csv +112 -0
  21. data/data/run_2007_01_10_22_44_54.xml +908 -0
  22. data/data/run_2007_01_11_10_48_45.xml +1292 -0
  23. data/data/run_2007_01_13_15_37_06.xml +1964 -0
  24. data/data/run_2007_01_14_15_46_02.xml +1368 -0
  25. data/data/run_2007_01_15_14_01_48.xml +1868 -0
  26. data/data/run_2007_01_20_16_22_05.xml +1702 -0
  27. data/data/run_2007_01_27_17_32_13.xml +3626 -0
  28. data/data/run_2007_01_28_19_14_52.xml +2538 -0
  29. data/data/run_2007_02_03_14_30_20.xml +2016 -0
  30. data/data/run_2007_02_04_18_02_30.xml +1476 -0
  31. data/data/run_2007_02_17_16_29_35.xml +1236 -0
  32. data/data/run_2007_02_19_14_44_33.xml +1816 -0
  33. data/data/run_2007_02_23_15_53_55.xml +36 -0
  34. data/data/run_2007_02_23_15_55_20.xml +1296 -0
  35. data/data/run_2007_02_24_15_01_35.csv +484 -0
  36. data/data/run_2007_02_24_15_01_35.xml +3884 -0
  37. data/data/test1.txt +4 -0
  38. data/img/gicons/blank.png +0 -0
  39. data/img/gicons/dd-end.png +0 -0
  40. data/img/gicons/dd-start.png +0 -0
  41. data/img/gicons/marker.png +0 -0
  42. data/img/gicons/marker0.png +0 -0
  43. data/img/gicons/marker00.png +0 -0
  44. data/img/gicons/marker01.png +0 -0
  45. data/img/gicons/marker02.png +0 -0
  46. data/img/gicons/marker03.png +0 -0
  47. data/img/gicons/marker04.png +0 -0
  48. data/img/gicons/marker05.png +0 -0
  49. data/img/gicons/marker06.png +0 -0
  50. data/img/gicons/marker07.png +0 -0
  51. data/img/gicons/marker08.png +0 -0
  52. data/img/gicons/marker09.png +0 -0
  53. data/img/gicons/marker1.png +0 -0
  54. data/img/gicons/marker10.png +0 -0
  55. data/img/gicons/marker11.png +0 -0
  56. data/img/gicons/marker12.png +0 -0
  57. data/img/gicons/marker13.png +0 -0
  58. data/img/gicons/marker14.png +0 -0
  59. data/img/gicons/marker15.png +0 -0
  60. data/img/gicons/marker16.png +0 -0
  61. data/img/gicons/marker17.png +0 -0
  62. data/img/gicons/marker18.png +0 -0
  63. data/img/gicons/marker19.png +0 -0
  64. data/img/gicons/marker2.png +0 -0
  65. data/img/gicons/marker20.png +0 -0
  66. data/img/gicons/marker21.png +0 -0
  67. data/img/gicons/marker22.png +0 -0
  68. data/img/gicons/marker23.png +0 -0
  69. data/img/gicons/marker24.png +0 -0
  70. data/img/gicons/marker25.png +0 -0
  71. data/img/gicons/marker26.png +0 -0
  72. data/img/gicons/marker27.png +0 -0
  73. data/img/gicons/marker28.png +0 -0
  74. data/img/gicons/marker29.png +0 -0
  75. data/img/gicons/marker3.png +0 -0
  76. data/img/gicons/marker30.png +0 -0
  77. data/img/gicons/marker31.png +0 -0
  78. data/img/gicons/marker32.png +0 -0
  79. data/img/gicons/marker33.png +0 -0
  80. data/img/gicons/marker34.png +0 -0
  81. data/img/gicons/marker35.png +0 -0
  82. data/img/gicons/marker36.png +0 -0
  83. data/img/gicons/marker37.png +0 -0
  84. data/img/gicons/marker38.png +0 -0
  85. data/img/gicons/marker39.png +0 -0
  86. data/img/gicons/marker4.png +0 -0
  87. data/img/gicons/marker40.png +0 -0
  88. data/img/gicons/marker41.png +0 -0
  89. data/img/gicons/marker42.png +0 -0
  90. data/img/gicons/marker43.png +0 -0
  91. data/img/gicons/marker44.png +0 -0
  92. data/img/gicons/marker45.png +0 -0
  93. data/img/gicons/marker46.png +0 -0
  94. data/img/gicons/marker47.png +0 -0
  95. data/img/gicons/marker48.png +0 -0
  96. data/img/gicons/marker49.png +0 -0
  97. data/img/gicons/marker5.png +0 -0
  98. data/img/gicons/marker50.png +0 -0
  99. data/img/gicons/marker51.png +0 -0
  100. data/img/gicons/marker52.png +0 -0
  101. data/img/gicons/marker53.png +0 -0
  102. data/img/gicons/marker54.png +0 -0
  103. data/img/gicons/marker55.png +0 -0
  104. data/img/gicons/marker56.png +0 -0
  105. data/img/gicons/marker57.png +0 -0
  106. data/img/gicons/marker58.png +0 -0
  107. data/img/gicons/marker59.png +0 -0
  108. data/img/gicons/marker6.png +0 -0
  109. data/img/gicons/marker60.png +0 -0
  110. data/img/gicons/marker61.png +0 -0
  111. data/img/gicons/marker62.png +0 -0
  112. data/img/gicons/marker63.png +0 -0
  113. data/img/gicons/marker64.png +0 -0
  114. data/img/gicons/marker65.png +0 -0
  115. data/img/gicons/marker66.png +0 -0
  116. data/img/gicons/marker67.png +0 -0
  117. data/img/gicons/marker68.png +0 -0
  118. data/img/gicons/marker69.png +0 -0
  119. data/img/gicons/marker7.png +0 -0
  120. data/img/gicons/marker70.png +0 -0
  121. data/img/gicons/marker71.png +0 -0
  122. data/img/gicons/marker72.png +0 -0
  123. data/img/gicons/marker73.png +0 -0
  124. data/img/gicons/marker74.png +0 -0
  125. data/img/gicons/marker75.png +0 -0
  126. data/img/gicons/marker76.png +0 -0
  127. data/img/gicons/marker77.png +0 -0
  128. data/img/gicons/marker78.png +0 -0
  129. data/img/gicons/marker79.png +0 -0
  130. data/img/gicons/marker8.png +0 -0
  131. data/img/gicons/marker80.png +0 -0
  132. data/img/gicons/marker81.png +0 -0
  133. data/img/gicons/marker82.png +0 -0
  134. data/img/gicons/marker83.png +0 -0
  135. data/img/gicons/marker84.png +0 -0
  136. data/img/gicons/marker85.png +0 -0
  137. data/img/gicons/marker86.png +0 -0
  138. data/img/gicons/marker87.png +0 -0
  139. data/img/gicons/marker88.png +0 -0
  140. data/img/gicons/marker89.png +0 -0
  141. data/img/gicons/marker9.png +0 -0
  142. data/img/gicons/marker90.png +0 -0
  143. data/img/gicons/marker91.png +0 -0
  144. data/img/gicons/marker92.png +0 -0
  145. data/img/gicons/marker93.png +0 -0
  146. data/img/gicons/marker94.png +0 -0
  147. data/img/gicons/marker95.png +0 -0
  148. data/img/gicons/marker96.png +0 -0
  149. data/img/gicons/marker97.png +0 -0
  150. data/img/gicons/marker98.png +0 -0
  151. data/img/gicons/marker99.png +0 -0
  152. data/img/gicons/markerA.png +0 -0
  153. data/img/gicons/markerB.png +0 -0
  154. data/img/gicons/markerC.png +0 -0
  155. data/img/gicons/markerD.png +0 -0
  156. data/img/gicons/markerE.png +0 -0
  157. data/img/gicons/markerF.png +0 -0
  158. data/img/gicons/markerG.png +0 -0
  159. data/img/gicons/markerH.png +0 -0
  160. data/img/gicons/markerI.png +0 -0
  161. data/img/gicons/markerJ.png +0 -0
  162. data/img/gicons/mm_20_red.png +0 -0
  163. data/img/gicons/mm_20_shadow.png +0 -0
  164. data/img/gicons/readme.txt +11 -0
  165. data/img/gicons/shadow50.png +0 -0
  166. data/lib/gooby/cls_counter_hash.rb +78 -0
  167. data/lib/gooby/cls_delim_line.rb +35 -0
  168. data/lib/gooby/cls_dttm.rb +79 -0
  169. data/lib/gooby/cls_duration.rb +79 -0
  170. data/lib/gooby/cls_forerunner_xml_parser.rb +178 -0
  171. data/lib/gooby/cls_forerunner_xml_splitter.rb +109 -0
  172. data/lib/gooby/cls_geo_data.rb +181 -0
  173. data/lib/gooby/cls_gooby_command.rb +35 -0
  174. data/lib/gooby/cls_gooby_object.rb +18 -0
  175. data/lib/gooby/cls_google_map_generator.rb +363 -0
  176. data/lib/gooby/cls_history.rb +33 -0
  177. data/lib/gooby/cls_lap.rb +22 -0
  178. data/lib/gooby/cls_line.rb +75 -0
  179. data/lib/gooby/cls_options.rb +67 -0
  180. data/lib/gooby/cls_position.rb +44 -0
  181. data/lib/gooby/cls_run.rb +194 -0
  182. data/lib/gooby/cls_simple_xml_parser.rb +41 -0
  183. data/lib/gooby/cls_test_regen.rb +182 -0
  184. data/lib/gooby/cls_track.rb +47 -0
  185. data/lib/gooby/cls_trackpoint.rb +200 -0
  186. data/lib/gooby/mod_introspect.rb +26 -0
  187. data/lib/gooby/mod_io.rb +58 -0
  188. data/lib/gooby/mod_project_info.rb +80 -0
  189. data/lib/gooby/mod_string.rb +19 -0
  190. data/lib/gooby/mod_test_helper.rb +15 -0
  191. data/lib/gooby.rb +2265 -0
  192. data/pkg/code_header.txt +21 -0
  193. data/pkg/pkg.rb +236 -0
  194. data/pkg/test_header.txt +19 -0
  195. data/samples/20041113_richmond_marathon.html +532 -0
  196. data/samples/20050305_corporate_cup_hm.html +448 -0
  197. data/samples/20050430_nashville_marathon.html +530 -0
  198. data/samples/gps_point_capture.html +54 -0
  199. data/samples/phoenix_marathon.html +542 -0
  200. data/samples/run_2007_01_10_22_44_54.html +201 -0
  201. data/samples/run_2007_02_24_15_01_35.html +298 -0
  202. data/tests/tc_cls_counter_hash.rb +107 -0
  203. data/tests/tc_cls_delim_line.rb +74 -0
  204. data/tests/tc_cls_dttm.rb +131 -0
  205. data/tests/tc_cls_duration.rb +51 -0
  206. data/tests/tc_cls_forerunner_xml_parser.rb +70 -0
  207. data/tests/tc_cls_geo_data.xxx +71 -0
  208. data/tests/tc_cls_gooby_object.rb +26 -0
  209. data/tests/tc_cls_google_map_generator.rb +109 -0
  210. data/tests/tc_cls_history.rb +46 -0
  211. data/tests/tc_cls_lap.rb +38 -0
  212. data/tests/tc_cls_line.rb +110 -0
  213. data/tests/tc_cls_options.rb +79 -0
  214. data/tests/tc_cls_position.rb +66 -0
  215. data/tests/tc_cls_run.rb +142 -0
  216. data/tests/tc_cls_simple_xml_parser.rb +50 -0
  217. data/tests/tc_cls_track.rb +70 -0
  218. data/tests/tc_cls_trackpoint.rb +145 -0
  219. data/tests/tc_mod_introspect.rb +32 -0
  220. data/tests/tc_mod_io.rb +53 -0
  221. data/tests/tc_mod_project_info.rb +79 -0
  222. data/tests/tc_mod_string.rb +58 -0
  223. data/tests/ts_gooby.rb +1237 -0
  224. metadata +270 -0
data/tests/ts_gooby.rb ADDED
@@ -0,0 +1,1237 @@
1
+ # Packaged on Sat Mar 03 16:56:38 EST 2007
2
+
3
+ =begin
4
+
5
+ This contains the regression test suite for the Gooby project.
6
+
7
+ See file 'lib/gooby.rb' which is the subject of this test suite.
8
+
9
+ Gooby - Copyright 2007 by Chris Joakim.
10
+ Gooby is available under GNU General Public License (GPL) license.
11
+
12
+ =end
13
+
14
+ # The following prefixes ../lib to the active ruby load path
15
+ $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
16
+ puts '$LOAD_PATH is now:'
17
+ puts $LOAD_PATH
18
+
19
+ require 'gooby'
20
+ require 'test/unit'
21
+
22
+
23
+ class TestModuleCon < Test::Unit::TestCase
24
+
25
+ include Gooby::TestHelper
26
+
27
+ @debug = false
28
+
29
+ ### Start of tests. Keep this line - see class TestGenerator.
30
+
31
+ def test_module_Con_default_delimiter
32
+
33
+ obj = Gooby::GoobyObject.new
34
+ actual = obj.default_delimiter
35
+ expected = '|'
36
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
37
+ end
38
+
39
+ def test_module_Con_invalid_distance
40
+
41
+ obj = Gooby::GoobyObject.new
42
+ actual = obj.invalid_distance
43
+ expected = -99999999
44
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
45
+ end
46
+
47
+ def test_module_Con_invalid_minutes
48
+
49
+ obj = Gooby::GoobyObject.new
50
+ actual = obj.invalid_minutes
51
+ expected = -99999999
52
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
53
+ end
54
+
55
+ def test_module_Con_invalid_time
56
+
57
+ obj = Gooby::GoobyObject.new
58
+ actual = obj.invalid_time
59
+ expected = -99999999
60
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
61
+ end
62
+
63
+ def test_module_Con_invalid_latitude
64
+
65
+ obj = Gooby::GoobyObject.new
66
+ actual = obj.invalid_latitude
67
+ expected = -1
68
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
69
+ end
70
+
71
+ def test_module_Con_invalid_longitude
72
+
73
+ obj = Gooby::GoobyObject.new
74
+ actual = obj.invalid_longitude
75
+ expected = -1
76
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
77
+ end
78
+
79
+ def test_module_Con_invalid_altitude
80
+
81
+ obj = Gooby::GoobyObject.new
82
+ actual = obj.invalid_altitude
83
+ expected = -1
84
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
85
+ end
86
+
87
+ end
88
+
89
+ class TestModuleIntrospect < Test::Unit::TestCase
90
+
91
+ include Gooby::TestHelper
92
+
93
+ @debug = false
94
+
95
+ ### Start of tests. Keep this line - see class TestGenerator.
96
+
97
+ def test_module_Introspect
98
+
99
+ end
100
+
101
+ def test_module_Introspect_introspect
102
+
103
+ end
104
+
105
+ def test_module_Introspect_to_yaml_properties
106
+
107
+ end
108
+ end
109
+
110
+ class TestModuleProjectInfo < Test::Unit::TestCase
111
+
112
+ include Gooby::TestHelper
113
+
114
+ @debug = false
115
+
116
+ ### Start of tests. Keep this line - see class TestGenerator.
117
+
118
+ def test_module_GoobyProjectInfo
119
+
120
+ end
121
+
122
+ def test_module_GoobyProjectInfo_google_maps_api_level
123
+
124
+ obj = Gooby::GoobyObject.new
125
+ assert_equal '2', obj.google_maps_api_level
126
+ end
127
+
128
+ def test_module_GoobyProjectInfo_project_author
129
+
130
+ obj = Gooby::GoobyObject.new
131
+ end
132
+
133
+ def test_module_GoobyProjectInfo_project_copyright
134
+
135
+ end
136
+
137
+ # Warning: possible obsolete test method - test_module_GoobyProjectInfo_project_copyrightttt
138
+
139
+ def test_module_GoobyProjectInfo_project_copyrightttt
140
+
141
+ obj = Gooby::GoobyObject.new
142
+ assert_equal 'Copyright (C) 2007 Chris Joakim', obj.project_copyright
143
+ end
144
+
145
+ def test_module_GoobyProjectInfo_project_date
146
+
147
+ obj = Gooby::GoobyObject.new
148
+ assert_equal '2007/03/03', obj.project_date
149
+ end
150
+
151
+ def test_module_GoobyProjectInfo_project_license
152
+
153
+ obj = Gooby::GoobyObject.new
154
+ assert_equal 'GNU General Public License (GPL). See http://www.gnu.org/copyleft/gpl.html', obj.project_license
155
+ end
156
+
157
+ def test_module_GoobyProjectInfo_project_version_number
158
+
159
+ obj = Gooby::GoobyObject.new
160
+ assert_equal '0.9.3', obj.project_version_number
161
+ end
162
+
163
+ def test_module_GoobyProjectInfo_project_year
164
+
165
+ obj = Gooby::GoobyObject.new
166
+ assert_equal '2007', obj.project_year
167
+ end
168
+
169
+ def test_module_GoobyProjectInfo_some_new_thing
170
+
171
+ end
172
+
173
+ def test_module_GoobyProjectInfo_tested_files
174
+
175
+ end
176
+ end
177
+
178
+ class TestModuleGoobyString < Test::Unit::TestCase
179
+
180
+ include Gooby::TestHelper
181
+
182
+ @debug = false
183
+
184
+ ### Start of tests. Keep this line - see class TestGenerator.
185
+
186
+ def test_module_GoobyString
187
+
188
+ end
189
+
190
+ def test_module_GoobyString_tokenize
191
+
192
+ obj = Gooby::GoobyObject.new
193
+ s = '35.4954711908794 -80.83214521408081 Home at South Faulkner Way Stopsign'
194
+ array = obj.tokenize(s, nil)
195
+ actual = array.size
196
+ expected = 8
197
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
198
+
199
+ actual = array[1]
200
+ expected = '-80.83214521408081'
201
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
202
+
203
+ actual = array[6]
204
+ expected = 'Way'
205
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
206
+
207
+ obj = Gooby::GoobyObject.new
208
+ s = 'twain , faulkner, wolfe, caldwell '
209
+ array = obj.tokenize(s, ',', false)
210
+
211
+ actual = array.size
212
+ expected = 4
213
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
214
+
215
+ actual = array[0]
216
+ expected = 'twain '
217
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
218
+
219
+ actual = array[3]
220
+ expected = ' caldwell '
221
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
222
+ end
223
+ end
224
+
225
+ class TestModuleGoobyIO < Test::Unit::TestCase
226
+
227
+ include Gooby::TestHelper
228
+
229
+ @debug = false
230
+
231
+ ### Start of tests. Keep this line - see class TestGenerator.
232
+
233
+ def test_module_GoobyIO
234
+
235
+ fn = 'data/test1.txt'
236
+ obj = Gooby::GoobyObject.new
237
+ a1 = obj.read_lines(fn, false)
238
+ a2 = obj.read_lines(fn, true)
239
+ a3 = obj.read_as_ascii_lines(fn, 10, false)
240
+
241
+ puts '' if @debug
242
+ a1.each { |line| puts line } if @debug
243
+ a2.each { |line| puts line } if @debug
244
+ a3.each { |line| puts line } if @debug
245
+
246
+ assert_equal('This is just a file', a2[0], "a2[0] is not as expected.")
247
+ assert_equal('This is just a file', a3[0], "a3[0] is not as expected.")
248
+ assert_equal('test data.', a2[3], "a2[1] is not as expected.")
249
+ assert_equal(' test data.', a3[3], "a3[3] is not as expected.")
250
+
251
+ puts "todo: implement #{name}" if @debug
252
+ end
253
+
254
+ def test_module_GoobyIO_read_as_ascii_lines
255
+
256
+ end
257
+
258
+ def test_module_GoobyIO_read_lines
259
+
260
+ end
261
+
262
+ def test_module_GoobyIO_strip_lines
263
+
264
+ end
265
+ end
266
+
267
+ class TestClassCounterHash < Test::Unit::TestCase
268
+
269
+ include Gooby::TestHelper
270
+
271
+ @debug = false
272
+
273
+ ### Start of tests. Keep this line - see class TestGenerator.
274
+
275
+ def test_class_CounterHash
276
+
277
+ # See the method-level tests below.
278
+ end
279
+
280
+ def test_class_CounterHash_decrement
281
+
282
+ cHash = Gooby::CounterHash.new
283
+ 7.times { cHash.decrement("seven") }
284
+ 391.times { cHash.decrement("391") }
285
+ assert(cHash.value('seven') == -7, "decremented value not -7.")
286
+ assert(cHash.value('391') == -391, "decremented value not -391.")
287
+ assert(cHash.sorted_keys.size == 2, "sorted_keys size is not 2.")
288
+ end
289
+
290
+ def test_class_CounterHash_increment
291
+
292
+ cHash = Gooby::CounterHash.new
293
+ 33.times { cHash.increment("33") }
294
+ 123.times { cHash.increment("123") }
295
+ assert(cHash.value('33') == 33, "incremented value not 33.")
296
+ assert(cHash.value('123') == 123, "incremented value not 123.")
297
+ assert(cHash.sorted_keys.size == 2, "sorted_keys size is not 2.")
298
+ end
299
+
300
+ def test_class_CounterHash_initialize
301
+
302
+ cHash = Gooby::CounterHash.new
303
+ assert(cHash.value('test') == 0, "initial value is not 0.")
304
+ assert(cHash.sorted_keys.size == 0, "sorted_keys size is not 0.")
305
+ end
306
+
307
+ def test_class_CounterHash_sorted_keys
308
+
309
+ cHash = Gooby::CounterHash.new
310
+ cHash.increment('OS/X')
311
+ cHash.decrement('Windows')
312
+ cHash.increment('Linux')
313
+ array = cHash.sorted_keys
314
+ assert(array.class == Array, "sorted_keys is not an Array; #{array.class}.")
315
+ assert(cHash.sorted_keys.size == 3, "sorted_keys size is not 3.")
316
+ assert(array[0] == 'Linux', "sorted_keys element 0 is incorrect.")
317
+ assert(array[1] == 'OS/X', "sorted_keys element 1 is incorrect.")
318
+ assert(array[2] == 'Windows', "sorted_keys element 2 is incorrect.")
319
+ end
320
+
321
+ def test_class_CounterHash_to_s
322
+
323
+ cHash = Gooby::CounterHash.new
324
+ cHash.increment("romeo")
325
+ cHash.increment("maybelline")
326
+ cHash.decrement("romeo")
327
+ cHash.increment("yingling")
328
+ cHash.increment("maybelline")
329
+ cHash.decrement("domino")
330
+ cHash.increment("yingling")
331
+ cHash.increment("maybelline")
332
+ cHash.increment("leppie")
333
+
334
+ expected = 'CHash: key: [domino] val: [-1] key: [leppie] val: [1] key: [maybelline] val: [3] key: [romeo] val: [0] key: [yingling] val: [2]'
335
+ actual = cHash.to_s
336
+ assert_equal(expected, actual, "to_s value is not as expected; #{actual} vs #{expected}")
337
+ end
338
+
339
+ def test_class_CounterHash_to_xml
340
+
341
+ cHash = Gooby::CounterHash.new
342
+ cHash.increment("romeo")
343
+ cHash.increment("maybelline")
344
+ cHash.decrement("romeo")
345
+ cHash.increment("yingling")
346
+ cHash.increment("maybelline")
347
+ cHash.decrement("domino")
348
+ cHash.increment("yingling")
349
+ cHash.increment("maybelline")
350
+ cHash.increment("leppie")
351
+
352
+ expected = "<CHash> <entry key='domino' value='-1'/> <entry key='leppie' value='1'/> <entry key='maybelline' value='3'/> <entry key='romeo' value='0'/> <entry key='yingling' value='2'/> </CHash>"
353
+ actual = cHash.to_xml(false)
354
+ assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
355
+ end
356
+
357
+ def test_class_CounterHash_value
358
+
359
+ # This method is tested in the other test methods.
360
+ end
361
+ end
362
+
363
+ class TestClassDelimLine < Test::Unit::TestCase
364
+
365
+ include Gooby::TestHelper
366
+
367
+ @debug = false
368
+
369
+ ### Start of tests. Keep this line - see class TestGenerator.
370
+
371
+ def test_class_DelimLine
372
+
373
+ line = '1 | 2007-01-01 | 16:38:43 | 1167669523 | 2 | 35.49532 | -80.83167 | 242.870 | 0.0313362638280469 '
374
+ dline = Gooby::DelimLine.new(line)
375
+
376
+ expected = 'DelimLine: length: 101 trim: true delim: | tokens: 9'
377
+ actual = dline.to_s
378
+ assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
379
+
380
+ expected = '1'
381
+ actual = dline.tokens[0]
382
+ assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
383
+
384
+ expected = '16:38:43'
385
+ actual = dline.tokens[2]
386
+ assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
387
+
388
+ expected = '0.0313362638280469'
389
+ actual = dline.tokens[-1]
390
+ assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
391
+ end
392
+
393
+ def test_class_DelimLine_as_trackpoint
394
+
395
+ line = '6 | 2007-01-13T16:35:53Z | 243 | 35.49517 | -80.83215 | 237.583 | 6.51627221396902 '
396
+ dline = Gooby::DelimLine.new(line)
397
+ tkpt = dline.as_trackpoint(0, 3, 4, 5, 1) # (numIdx, latIdx, lngIdx, altIdx, timeIdx)
398
+ end
399
+
400
+ def test_class_DelimLine_initialize
401
+
402
+ # This method is tested in the other test methods.
403
+ end
404
+
405
+ def test_class_DelimLine_is_comment?
406
+
407
+ dline = Gooby::DelimLine.new('# this is a comment line')
408
+ bool1 = dline.is_comment?
409
+
410
+ dline = Gooby::DelimLine.new('this is not a comment line')
411
+ bool2 = dline.is_comment?
412
+
413
+ dline = Gooby::DelimLine.new(' # this is a comment line')
414
+ bool3 = dline.is_comment?
415
+
416
+ assert(bool1 == true, "line 1 should be a comment")
417
+ assert(bool2 == false, "line 2 not should be a comment")
418
+ assert(bool3 == true, "line 3 should be a comment")
419
+ end
420
+
421
+ def test_class_DelimLine_to_s
422
+
423
+ end
424
+ end
425
+
426
+ class TestClassDtTm < Test::Unit::TestCase
427
+
428
+ include Gooby::TestHelper
429
+ include Gooby::Con
430
+
431
+ @debug = false
432
+
433
+ ### Start of tests. Keep this line - see class TestGenerator.
434
+
435
+ def test_class_DtTm
436
+
437
+ # This class is tested in the methods below.
438
+ end
439
+
440
+ def test_class_DtTm_hh_mm_ss
441
+
442
+ s = '2006-01-15T01:02:00Z'
443
+ dt = Gooby::DtTm.new(s)
444
+ actual = dt.hh_mm_ss
445
+ expected = '01:02:00'
446
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
447
+
448
+ s = '2006-01-15T03:41:40Z'
449
+ dt = Gooby::DtTm.new(s)
450
+ actual = dt.hh_mm_ss
451
+ expected = '03:41:40'
452
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
453
+ end
454
+
455
+ def test_class_DtTm_hhmmss_diff
456
+
457
+ s1 = '2006-01-15T02:39:37Z'
458
+ dt1 = Gooby::DtTm.new(s1)
459
+ s2 = '2006-01-15T03:41:40Z'
460
+ dt2 = Gooby::DtTm.new(s2)
461
+ actual = dt2.hhmmss_diff(dt1)
462
+ expected = '01:02:03'
463
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
464
+ end
465
+
466
+ def test_class_DtTm_initialize
467
+
468
+ dt1 = Gooby::DtTm.new(nil)
469
+ dt2 = Gooby::DtTm.new('too short')
470
+ dt3 = Gooby::DtTm.new('2006-01-15T03:41:40Z')
471
+
472
+ assert(dt1.valid == false, "dt1 should not be valid.")
473
+ assert(dt2.valid == false, "dt2 should not be valid.")
474
+ assert(dt3.valid == true, "dt3 should not be valid.")
475
+ assert(dt1.to_i == invalid_time, "dt1 to_i should be #{invalid_time}.")
476
+
477
+ end
478
+
479
+ # Warning: possible obsolete test method - test_class_DtTm_parse
480
+
481
+ def test_class_DtTm_parse
482
+
483
+ # This method is tested in the other test methods.
484
+ end
485
+
486
+ def test_class_DtTm_print_string
487
+
488
+ dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
489
+ actual = dt.print_string
490
+ expected = "DtTm: 2007-02-01 02:13:52 1170296032 2007-02-01T02:13:52Z"
491
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
492
+ end
493
+
494
+ def test_class_DtTm_seconds_diff
495
+
496
+ dt1 = Gooby::DtTm.new('2007-02-01T11:59:59Z')
497
+ dt2 = Gooby::DtTm.new('2007-02-01T12:00:00Z')
498
+ dt3 = Gooby::DtTm.new('2007-02-01T13:01:02')
499
+
500
+ actual = dt2.seconds_diff(dt1)
501
+ expected = 1
502
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
503
+
504
+ actual = dt3.seconds_diff(dt1)
505
+ expected = 3663
506
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
507
+
508
+ actual = dt1.seconds_diff(dt3)
509
+ expected = -3663
510
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
511
+ end
512
+
513
+ def test_class_DtTm_to_i
514
+
515
+ dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
516
+ actual = dt.to_i
517
+ expected = 1170296032
518
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
519
+ end
520
+
521
+ def test_class_DtTm_to_s
522
+
523
+ dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
524
+ actual = dt.to_s
525
+ expected = "2007-02-01T02:13:52Z"
526
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
527
+ end
528
+
529
+ def test_class_DtTm_yyyy_mm_dd
530
+
531
+ dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
532
+ actual = dt.yyyy_mm_dd
533
+ expected = "2007-02-01"
534
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
535
+ end
536
+
537
+ def test_class_DtTm_yyyy_mm_dd_hh_mm_ss
538
+
539
+ dt = Gooby::DtTm.new('2007-02-01T02:13:52Z')
540
+ actual = dt.yyyy_mm_dd_hh_mm_ss
541
+ expected = "2007-02-01 02:13:52"
542
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
543
+ end
544
+ end
545
+
546
+ class TestClassDuration < Test::Unit::TestCase
547
+
548
+ include Gooby::TestHelper
549
+ include Gooby::Con
550
+
551
+ @debug = false
552
+
553
+ ### Start of tests. Keep this line - see class TestGenerator.
554
+
555
+ def test_class_Duration
556
+
557
+ d1 = Gooby::Duration.new('PT507.870S')
558
+ s1a = d1.to_s
559
+ s1b = d1.print_string
560
+ actual = s1a
561
+ expected = '08:27.87'
562
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
563
+
564
+ actual = s1b
565
+ expected = 'Duration: 507.870 sec: 507.87 min: 8.4645 mmss: 08:27.87 bm: 8 fm: 0.464499999999999 fs: 27.87'
566
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
567
+ end
568
+
569
+ def test_class_Duration_initialize
570
+
571
+ end
572
+
573
+ def test_class_Duration_print_string
574
+
575
+ end
576
+
577
+ def test_class_Duration_scrub
578
+
579
+ end
580
+
581
+ def test_class_Duration_to_s
582
+
583
+ end
584
+ end
585
+
586
+ class TestClassForerunnerXmlParser < Test::Unit::TestCase
587
+
588
+ include Gooby::TestHelper
589
+
590
+ @debug = false
591
+
592
+ ### Start of tests. Keep this line - see class TestGenerator.
593
+
594
+ def test_class_ForerunnerXmlParser
595
+
596
+ end
597
+
598
+ def test_class_ForerunnerXmlParser_detail_tag?
599
+
600
+ end
601
+
602
+ def test_class_ForerunnerXmlParser_dump
603
+
604
+ end
605
+
606
+ def test_class_ForerunnerXmlParser_gdump
607
+
608
+ end
609
+
610
+ def test_class_ForerunnerXmlParser_initialize
611
+
612
+ end
613
+
614
+ def test_class_ForerunnerXmlParser_is_tag?
615
+
616
+ end
617
+
618
+ def test_class_ForerunnerXmlParser_put_all_run_tkpt_csv
619
+
620
+ end
621
+
622
+ def test_class_ForerunnerXmlParser_put_run_csv
623
+
624
+ end
625
+
626
+ def test_class_ForerunnerXmlParser_tag_end
627
+
628
+ end
629
+
630
+ def test_class_ForerunnerXmlParser_tag_start
631
+
632
+ end
633
+
634
+ def test_class_ForerunnerXmlParser_text
635
+
636
+ end
637
+
638
+ # Warning: possible obsolete test method - test_stub
639
+
640
+ def test_stub
641
+
642
+ end
643
+ end
644
+
645
+ class TestClassGoobyObject < Test::Unit::TestCase
646
+
647
+ include Gooby::TestHelper
648
+
649
+ @debug = false
650
+
651
+ ### Start of tests. Keep this line - see class TestGenerator.
652
+
653
+ # Warning: possible obsolete test method - test_stub
654
+
655
+ def test_stub
656
+
657
+ end
658
+ end
659
+
660
+ class TestClassHistory < Test::Unit::TestCase
661
+
662
+ include Gooby::TestHelper
663
+
664
+ @debug = false
665
+
666
+ ### Start of tests. Keep this line - see class TestGenerator.
667
+
668
+ def test_class_History
669
+
670
+ end
671
+
672
+ def test_class_History_add_run
673
+
674
+ end
675
+
676
+ def test_class_History_initialize
677
+
678
+ end
679
+
680
+ def test_class_History_print_string
681
+
682
+ end
683
+
684
+ def test_class_History_to_s
685
+
686
+ end
687
+
688
+ # Warning: possible obsolete test method - test_stub
689
+
690
+ def test_stub
691
+
692
+ end
693
+ end
694
+
695
+ class TestClassLap < Test::Unit::TestCase
696
+
697
+ include Gooby::TestHelper
698
+
699
+ @debug = false
700
+
701
+ ### Start of tests. Keep this line - see class TestGenerator.
702
+
703
+ def test_class_Lap
704
+
705
+ end
706
+
707
+ def test_class_Lap_initialize
708
+
709
+ end
710
+
711
+ def test_class_Lap_to_s
712
+
713
+ end
714
+
715
+ # Warning: possible obsolete test method - test_stub
716
+
717
+ def test_stub
718
+
719
+ end
720
+ end
721
+
722
+ class TestClassLine < Test::Unit::TestCase
723
+
724
+ include Gooby::TestHelper
725
+
726
+ @debug = false
727
+
728
+ ### Start of tests. Keep this line - see class TestGenerator.
729
+
730
+ def test_class_Line
731
+
732
+ end
733
+
734
+ def test_class_Line_concatinate_tokens
735
+
736
+ s = '35.4954711908794 -80.83214521408081 Home at South Faulkner Way Stopsign'
737
+ line = Gooby::Line.new(s)
738
+ actual = line.concatinate_tokens(2)
739
+ expected = 'Home at South Faulkner Way Stopsign'
740
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
741
+ end
742
+
743
+ def test_class_Line_initialize
744
+
745
+ s = '35.4954711908794 -80.83214521408081 Home at South Faulkner Way Stopsign'
746
+ line = Gooby::Line.new(s)
747
+ actual = line.tokens[6]
748
+ expected = 'Way'
749
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
750
+ end
751
+
752
+ def test_class_Line_is_comment
753
+
754
+ line = Gooby::Line.new(' # hello ')
755
+ actual = line.is_comment
756
+ expected = true
757
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
758
+
759
+ line = Gooby::Line.new('heck no')
760
+ actual = line.is_comment
761
+ expected = false
762
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
763
+
764
+ end
765
+
766
+ def test_class_Line_is_populated_non_comment
767
+
768
+ end
769
+
770
+ def test_class_Line_match
771
+
772
+ end
773
+
774
+ def test_class_Line_token
775
+
776
+ end
777
+
778
+ def test_class_Line_token_count
779
+
780
+ end
781
+
782
+ def test_class_Line_token_idx_equals
783
+
784
+ s = '35.4954711908794 -80.83214521408081 Home at South Faulkner Way Stopsign'
785
+ line = Gooby::Line.new(s)
786
+
787
+ actual = line.token_idx_equals(2, 'Home')
788
+ expected = true
789
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
790
+
791
+ actual = line.token_idx_equals(1, 'Home')
792
+ expected = false
793
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
794
+
795
+ actual = line.token_idx_equals(99, 'Home')
796
+ expected = false
797
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
798
+ end
799
+
800
+ # Warning: possible obsolete test method - test_class_is_populated_non_comment
801
+
802
+ def test_class_is_populated_non_comment
803
+
804
+ line = Gooby::Line.new(' # hello ')
805
+ actual = line.is_populated_non_comment
806
+ expected = false
807
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
808
+
809
+ line = Gooby::Line.new('heck no')
810
+ actual = line.is_populated_non_comment
811
+ expected = true
812
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
813
+
814
+ line = Gooby::Line.new(' ')
815
+ actual = line.is_populated_non_comment
816
+ expected = false
817
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
818
+ end
819
+ end
820
+
821
+ class TestClassPosition < Test::Unit::TestCase
822
+
823
+ include Gooby::TestHelper
824
+
825
+ @debug = false
826
+
827
+ ### Start of tests. Keep this line - see class TestGenerator.
828
+
829
+ def test_class_Position
830
+
831
+ end
832
+
833
+ def test_class_Position_altitude_as_float
834
+
835
+ pos = Gooby::Position.new('35.49910', '-80.83695', '220.279')
836
+ assert_equal(220.279, pos.altitude_as_float, "altitude is not as expected.")
837
+ end
838
+
839
+ def test_class_Position_initialize
840
+
841
+ pos = Gooby::Position.new('35.49910', '-80.83695', '220.279')
842
+ assert_equal('35.49910', pos.latitude, "latitude is not as expected.")
843
+ assert_equal('-80.83695', pos.longitude, "longitude is not as expected.")
844
+ assert_equal('220.279', pos.altitude, "altitude is not as expected.")
845
+ end
846
+
847
+ def test_class_Position_latitude_as_float
848
+
849
+ pos = Gooby::Position.new('35.49910', '-80.83695', '220.279')
850
+ assert_equal(35.49910, pos.latitude_as_float, "latitude is not as expected.")
851
+ end
852
+
853
+ def test_class_Position_longitude_as_float
854
+
855
+ pos = Gooby::Position.new('35.49910', '-80.83695', '220.279')
856
+ assert_equal(-80.83695, pos.longitude_as_float, "longitude is not as expected.")
857
+ end
858
+
859
+ def test_class_Position_to_csv
860
+
861
+ pos = Gooby::Position.new('35.49910', '-80.83695', '220.279')
862
+ actual = pos.to_csv
863
+ expected = '35.49910 | -80.83695 | 220.279'
864
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
865
+ end
866
+
867
+ def test_class_Position_to_s
868
+
869
+ pos = Gooby::Position.new('35.49910', '-80.83695', '220.279')
870
+ actual = pos.to_s
871
+ expected = 'lat: 35.49910 lng: -80.83695 alt: 220.279 note: '
872
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
873
+ end
874
+ end
875
+
876
+ class TestClassRun < Test::Unit::TestCase
877
+
878
+ include Gooby::TestHelper
879
+
880
+ @debug = false
881
+
882
+ ### Start of tests. Keep this line - see class TestGenerator.
883
+
884
+ def test_class_Run
885
+
886
+ end
887
+
888
+ def test_class_Run_add_lap
889
+
890
+ end
891
+
892
+ def test_class_Run_add_track
893
+
894
+ end
895
+
896
+ # Warning: possible obsolete test method - test_class_Run_compute_center_point
897
+
898
+ def test_class_Run_compute_center_point
899
+
900
+ end
901
+
902
+ def test_class_Run_compute_distance_and_pace
903
+
904
+ end
905
+
906
+ def test_class_Run_compute_splits
907
+
908
+ end
909
+
910
+ def test_class_Run_duration
911
+
912
+ end
913
+
914
+ def test_class_Run_end_dttm
915
+
916
+ end
917
+
918
+ def test_class_Run_end_hh_mm_ss
919
+
920
+ end
921
+
922
+ # Warning: possible obsolete test method - test_class_Run_filter_trackpoints
923
+
924
+ def test_class_Run_filter_trackpoints
925
+
926
+ end
927
+
928
+ def test_class_Run_finish
929
+
930
+ end
931
+
932
+ # Warning: possible obsolete test method - test_class_Run_generate_gmap_info
933
+
934
+ def test_class_Run_generate_gmap_info
935
+
936
+ end
937
+
938
+ # Warning: possible obsolete test method - test_class_Run_generate_gpoint_array
939
+
940
+ def test_class_Run_generate_gpoint_array
941
+
942
+ end
943
+
944
+ # Warning: possible obsolete test method - test_class_Run_generate_key_js
945
+
946
+ def test_class_Run_generate_key_js
947
+
948
+ end
949
+
950
+ # Warning: possible obsolete test method - test_class_Run_generate_overlay_points
951
+
952
+ def test_class_Run_generate_overlay_points
953
+
954
+ end
955
+
956
+ def test_class_Run_initialize
957
+
958
+ end
959
+
960
+ def test_class_Run_lapCount
961
+
962
+ end
963
+
964
+ def test_class_Run_print_string
965
+
966
+ end
967
+
968
+ def test_class_Run_put_csv
969
+
970
+ end
971
+
972
+ def test_class_Run_put_laps
973
+
974
+ end
975
+
976
+ def test_class_Run_put_tkpt_csv
977
+
978
+ end
979
+
980
+ def test_class_Run_start_dttm
981
+
982
+ end
983
+
984
+ def test_class_Run_start_hh_mm_ss
985
+
986
+ end
987
+
988
+ def test_class_Run_start_yyyy_mm_dd
989
+
990
+ end
991
+
992
+ def test_class_Run_to_s
993
+
994
+ end
995
+
996
+ def test_class_Run_trackpoint_count
997
+
998
+ end
999
+
1000
+ # Warning: possible obsolete test method - test_stub
1001
+
1002
+ def test_stub
1003
+
1004
+ end
1005
+ end
1006
+
1007
+ class TestClassSimpleXmlParser < Test::Unit::TestCase
1008
+
1009
+ include Gooby::TestHelper
1010
+
1011
+ @debug = false
1012
+
1013
+ ### Start of tests. Keep this line - see class TestGenerator.
1014
+
1015
+ def test_class_SimpleXmlParser
1016
+
1017
+ end
1018
+
1019
+ def test_class_SimpleXmlParser_dump
1020
+
1021
+ end
1022
+
1023
+ def test_class_SimpleXmlParser_initialize
1024
+
1025
+ end
1026
+
1027
+ def test_class_SimpleXmlParser_tag_end
1028
+
1029
+ end
1030
+
1031
+ def test_class_SimpleXmlParser_tag_start
1032
+
1033
+ end
1034
+
1035
+ def test_class_SimpleXmlParser_text
1036
+
1037
+ end
1038
+
1039
+ # Warning: possible obsolete test method - test_stub
1040
+
1041
+ def test_stub
1042
+
1043
+ end
1044
+ end
1045
+
1046
+ class TestClassTrack < Test::Unit::TestCase
1047
+
1048
+ include Gooby::TestHelper
1049
+
1050
+ @debug = false
1051
+
1052
+ ### Start of tests. Keep this line - see class TestGenerator.
1053
+
1054
+ def test_class_Track
1055
+
1056
+ end
1057
+
1058
+ def test_class_Track_add_trackpoint
1059
+
1060
+ end
1061
+
1062
+ def test_class_Track_dump
1063
+
1064
+ end
1065
+
1066
+ # Warning: possible obsolete test method - test_class_Track_firstTkpt
1067
+
1068
+ def test_class_Track_firstTkpt
1069
+
1070
+ end
1071
+
1072
+ def test_class_Track_first_tkpt
1073
+
1074
+ end
1075
+
1076
+ def test_class_Track_initialize
1077
+
1078
+ end
1079
+
1080
+ # Warning: possible obsolete test method - test_class_Track_lastTkpt
1081
+
1082
+ def test_class_Track_lastTkpt
1083
+
1084
+ end
1085
+
1086
+ def test_class_Track_last_tkpt
1087
+
1088
+ end
1089
+
1090
+ def test_class_Track_size
1091
+
1092
+ end
1093
+
1094
+ def test_class_Track_to_s
1095
+
1096
+ end
1097
+
1098
+ # Warning: possible obsolete test method - test_stub
1099
+
1100
+ def test_stub
1101
+
1102
+ end
1103
+ end
1104
+
1105
+ class TestClassTrackpoint < Test::Unit::TestCase
1106
+
1107
+ include Gooby::TestHelper
1108
+
1109
+ @debug = false
1110
+
1111
+ ### Start of tests. Keep this line - see class TestGenerator.
1112
+
1113
+ def test_class_Trackpoint
1114
+
1115
+ tkpt = Gooby::Trackpoint.new(1, '35.49910', '-80.83695', '220.279', '2007-02-01T02:13:52Z')
1116
+ end
1117
+
1118
+ # Warning: possible obsolete test method - test_class_Trackpoint_altitude_as_float
1119
+
1120
+ def test_class_Trackpoint_altitude_as_float
1121
+
1122
+ tkpt = Gooby::Trackpoint.new(1, '35.49910', '-80.83695', '220.279', '2007-02-01T02:13:52Z')
1123
+ actual = tkpt.altitude_as_float
1124
+ expected = 220.279
1125
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
1126
+ end
1127
+
1128
+ def test_class_Trackpoint_as_glatlng
1129
+
1130
+ end
1131
+
1132
+ def test_class_Trackpoint_as_info_window_html
1133
+
1134
+ end
1135
+
1136
+ # Warning: possible obsolete test method - test_class_Trackpoint_as_overlay_finish_point
1137
+
1138
+ def test_class_Trackpoint_as_overlay_finish_point
1139
+
1140
+ end
1141
+
1142
+ # Warning: possible obsolete test method - test_class_Trackpoint_as_overlay_point
1143
+
1144
+ def test_class_Trackpoint_as_overlay_point
1145
+
1146
+ end
1147
+
1148
+ # Warning: possible obsolete test method - test_class_Trackpoint_as_overlay_start_point
1149
+
1150
+ def test_class_Trackpoint_as_overlay_start_point
1151
+
1152
+ end
1153
+
1154
+ def test_class_Trackpoint_compute_cumulative_pace
1155
+
1156
+ end
1157
+
1158
+ def test_class_Trackpoint_compute_distance_and_pace
1159
+
1160
+ end
1161
+
1162
+ def test_class_Trackpoint_deg2rad
1163
+
1164
+ end
1165
+
1166
+ def test_class_Trackpoint_initialize
1167
+
1168
+ end
1169
+
1170
+ def test_class_Trackpoint_is_first
1171
+
1172
+ end
1173
+
1174
+ def test_class_Trackpoint_is_last
1175
+
1176
+ end
1177
+
1178
+ def test_class_Trackpoint_is_split
1179
+
1180
+ end
1181
+
1182
+ # Warning: possible obsolete test method - test_class_Trackpoint_latitude_as_float
1183
+
1184
+ def test_class_Trackpoint_latitude_as_float
1185
+
1186
+ tkpt = Gooby::Trackpoint.new(1, '35.49910', '-80.83695', '220.279', '2007-02-01T02:13:52Z')
1187
+ actual = tkpt.latitude_as_float
1188
+ expected = 35.49910
1189
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
1190
+ end
1191
+
1192
+ # Warning: possible obsolete test method - test_class_Trackpoint_longitude_as_float
1193
+
1194
+ def test_class_Trackpoint_longitude_as_float
1195
+
1196
+ tkpt = Gooby::Trackpoint.new(1, '35.49910', '-80.83695', '220.279', '2007-02-01T02:13:52Z')
1197
+ actual = tkpt.longitude_as_float
1198
+ expected = -80.83695
1199
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
1200
+ end
1201
+
1202
+ def test_class_Trackpoint_position
1203
+
1204
+ end
1205
+
1206
+ def test_class_Trackpoint_rad2deg
1207
+
1208
+ end
1209
+
1210
+ def test_class_Trackpoint_set_split
1211
+
1212
+ end
1213
+
1214
+ def test_class_Trackpoint_split_info
1215
+
1216
+ end
1217
+
1218
+ def test_class_Trackpoint_to_csv
1219
+
1220
+ tkpt = Gooby::Trackpoint.new(1, '35.49910', '-80.83695', '220.279', '2007-02-01T02:13:52Z')
1221
+ actual = tkpt.to_csv
1222
+ expected = '0 | 2007-02-01T02:13:52Z | 1 | 35.49910 | -80.83695 | 220.279 | 0.0 '
1223
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
1224
+ end
1225
+
1226
+ def test_class_Trackpoint_to_geo_s
1227
+
1228
+ end
1229
+
1230
+ def test_class_Trackpoint_to_s
1231
+
1232
+ tkpt = Gooby::Trackpoint.new(1, '35.49910', '-80.83695', '220.279', '2007-02-01T02:13:52Z')
1233
+ actual = tkpt.to_s
1234
+ expected = 'Tkpt: 1 lat: 35.49910 lng: -80.83695 alt: 220.279 note: date: 2007-02-01T02:13:52Z cdist: 0.0'
1235
+ assert_equal(expected, actual, "value is not as expected; #{actual} vs #{expected}")
1236
+ end
1237
+ end