open_ehr 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/History.txt +3 -0
  2. data/README.rdoc +3 -3
  3. data/VERSION +1 -1
  4. data/lib/open_ehr/am/archetype/constraint_model/primitive.rb +61 -34
  5. data/lib/open_ehr/am/openehr_profile/data_types/basic.rb +27 -0
  6. data/lib/open_ehr/am/openehr_profile/data_types/quantity.rb +18 -0
  7. data/lib/open_ehr/am/openehr_profile/data_types/text.rb +22 -0
  8. data/lib/open_ehr/am/openehr_profile/data_types.rb +12 -0
  9. data/lib/open_ehr/am/openehr_profile.rb +10 -0
  10. data/lib/open_ehr/am.rb +2 -0
  11. data/lib/open_ehr/assumed_library_types.rb +30 -25
  12. data/lib/open_ehr/parser/cadl_grammar.tt +479 -163
  13. data/lib/open_ehr/parser/shared_token_grammar.tt +63 -43
  14. data/lib/open_ehr/rm/data_types/quantity/date_time.rb +27 -14
  15. data/lib/open_ehr.rb +1 -1
  16. data/open_ehr.gemspec +17 -6
  17. data/spec/lib/open_ehr/am/archetype/assertion/operator_kind_spec.rb +4 -0
  18. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_date_spec.rb +20 -48
  19. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_date_time_spec.rb +33 -8
  20. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_duration_spec.rb +19 -52
  21. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_string_spec.rb +2 -3
  22. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_time_spec.rb +27 -7
  23. data/spec/lib/open_ehr/am/archetype/ontology/archetype_ontology_spec.rb +0 -1
  24. data/spec/lib/open_ehr/am/openehr_profile/data_types/text/c_code_phrase_spec.rb +35 -0
  25. data/spec/lib/open_ehr/parser/adl14/adl-test-SOME_TYPE.generic_type_basic.draft.adl +1 -1
  26. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_slot.test.adl +1 -1
  27. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_slot.test2.adl +1 -1
  28. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.basic_types.test.adl +3 -3
  29. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_code_phrase.test.adl +1 -1
  30. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.datetime.test.adl +1 -1
  31. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.durations.test.adl +2 -4
  32. data/spec/lib/open_ehr/parser/adl_archetype_internal_ref_with_generics_spec.rb +6 -6
  33. data/spec/lib/open_ehr/parser/adl_archetype_slot_cluster_spec.rb +101 -0
  34. data/spec/lib/open_ehr/parser/adl_archetype_slot_spec.rb +193 -0
  35. data/spec/lib/open_ehr/parser/adl_archetype_uncommon_term_keys_spec.rb +25 -0
  36. data/spec/lib/open_ehr/parser/adl_parser_spec.rb +6 -6
  37. data/spec/lib/open_ehr/parser/basic_generic_type_spec.rb +18 -0
  38. data/spec/lib/open_ehr/parser/basic_type_spec.rb +2922 -0
  39. data/spec/lib/open_ehr/parser/code_phrase_spec.rb +91 -0
  40. data/spec/lib/open_ehr/parser/date_time_spec.rb +1953 -0
  41. data/spec/lib/open_ehr/parser/duration_spec.rb +475 -0
  42. data/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_duration_spec.rb +44 -0
  43. data/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb +6 -2
  44. data/spec/spec_helper.rb +3 -2
  45. metadata +52 -41
  46. data/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb +0 -21
  47. data/lib/open_ehr/am/open_ehr_profile/data_types/basic.rb +0 -29
  48. data/lib/open_ehr/am/open_ehr_profile/data_types/quantity.rb +0 -19
  49. data/lib/open_ehr/am/open_ehr_profile/data_types/text.rb +0 -15
@@ -0,0 +1,1953 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require File.dirname(__FILE__) + '/parser_spec_helper'
3
+
4
+ # ticket 177
5
+
6
+ def attr(index)
7
+ return @constraints[index-1].children[0]
8
+ end
9
+
10
+ def const(index)
11
+ return @attributes[index].children[0].attributes
12
+ end
13
+
14
+
15
+ describe ADLParser do
16
+ context 'Date Time type' do
17
+ before(:all) do
18
+ archetype = adl14_archetype('adl-test-entry.datetime.test.adl')
19
+ @attributes = archetype.definition.attributes
20
+ end
21
+
22
+ context 'Date type' do
23
+ before(:all) do
24
+ @constraints = const(0)
25
+ end
26
+
27
+ context '1st attribute yyyy-mm-dd' do
28
+ before(:all) do
29
+ @at = attr(1)
30
+ end
31
+
32
+ it 'pattern is yyyy-mm-dd' do
33
+ @at.pattern.should == 'yyyy-mm-dd'
34
+ end
35
+
36
+ it 'does not have assumed_value' do
37
+ @at.should_not have_assumed_value
38
+ end
39
+ end
40
+
41
+ context '2nd attribute yyyy-mm-dd' do
42
+ before(:all) do
43
+ @at = attr(2)
44
+ end
45
+
46
+ it 'pattern is yyyy-??-??' do
47
+ @at.pattern.should == 'yyyy-??-??'
48
+ end
49
+ end
50
+
51
+ context '3rd attribute yyyy-mm-??' do
52
+ before(:all) do
53
+ @at = attr(3)
54
+ end
55
+
56
+ it 'pattern is yyyy-mm-??' do
57
+ @at.pattern.should == 'yyyy-mm-??'
58
+ end
59
+ end
60
+
61
+ context '4th attribute yyyy-??-XX' do
62
+ before(:all) do
63
+ @at = attr(4)
64
+ end
65
+
66
+ it ' pattern is yyyy-??-XX' do
67
+ @at.pattern.should == 'yyyy-??-XX'
68
+ end
69
+ end
70
+
71
+ context '5th attribute 1983-12-25' do
72
+ before(:all) do
73
+ @at = attr(5)
74
+ end
75
+
76
+ it '1st item of list is 1983-12-25' do
77
+ @at.list[0].value.should == '1983-12-25'
78
+ end
79
+ end
80
+
81
+ context '5th attribute 1983-12-25' do
82
+ before(:all) do
83
+ @at = attr(5)
84
+ end
85
+
86
+ it '1st item of list is 1983-12-25' do
87
+ @at.list[0].value.should == '1983-12-25'
88
+ end
89
+ end
90
+
91
+ context '6th attribute 2000-01-01' do
92
+ before(:all) do
93
+ @at = attr(6)
94
+ end
95
+
96
+ it '1st item of list is 2000-01-01' do
97
+ @at.list[0].value.should == '2000-01-01'
98
+ end
99
+ end
100
+
101
+ context '6th attribute 2000-01-01' do
102
+ before(:all) do
103
+ @at = attr(6)
104
+ end
105
+
106
+ it '1st item of list is 2000-01-01' do
107
+ @at.list[0].value.should == '2000-01-01'
108
+ end
109
+ end
110
+
111
+ context '7th attribute |2004-09-20..2004-10-20|' do
112
+ before(:all) do
113
+ @at = attr(7)
114
+ end
115
+
116
+ it 'lower range is 2004-09-20' do
117
+ @at.range.lower.value.should == '2004-09-20'
118
+ end
119
+
120
+ it 'upper range is 2004-10-20' do
121
+ @at.range.upper.value.should == '2004-10-20'
122
+ end
123
+
124
+ it 'is lower included' do
125
+ @at.range.should be_lower_included
126
+ end
127
+
128
+ it 'is upper included' do
129
+ @at.range.should be_upper_included
130
+ end
131
+ end
132
+
133
+ context '8th attribute |< 2004-09-20|' do
134
+ before(:all) do
135
+ @at = attr(8)
136
+ end
137
+
138
+ it 'upper range is 2004-09-20' do
139
+ @at.range.upper.value.should == '2004-09-20'
140
+ end
141
+
142
+ it 'is not upper included' do
143
+ @at.range.should_not be_upper_included
144
+ end
145
+
146
+ it 'is lower unbounded' do
147
+ @at.range.should be_lower_unbounded
148
+ end
149
+ end
150
+
151
+ context '9th attribute |<= 2004-09-20|' do
152
+ before(:all) do
153
+ @at = attr(9)
154
+ end
155
+
156
+ it 'upper range is 2004-09-20' do
157
+ @at.range.upper.value.should == '2004-09-20'
158
+ end
159
+
160
+ it 'is upper included' do
161
+ @at.range.should be_upper_included
162
+ end
163
+
164
+ it 'is lower unbounded' do
165
+ @at.range.should be_lower_unbounded
166
+ end
167
+ end
168
+
169
+ context '10th attribute |> 2004-09-20|' do
170
+ before(:all) do
171
+ @at = attr(10)
172
+ end
173
+
174
+ it 'lower range is 2004-09-20' do
175
+ @at.range.lower.value.should == '2004-09-20'
176
+ end
177
+
178
+ it 'is not lower included' do
179
+ @at.range.should_not be_lower_included
180
+ end
181
+
182
+ it 'is upper unbounded' do
183
+ @at.range.should be_upper_unbounded
184
+ end
185
+ end
186
+
187
+ context '11th attribute |>= 2004-09-20|' do
188
+ before(:all) do
189
+ @at = attr(11)
190
+ end
191
+
192
+ it 'lower range is 2004-09-20' do
193
+ @at.range.lower.value.should == '2004-09-20'
194
+ end
195
+
196
+ it 'is lower included' do
197
+ @at.range.should be_lower_included
198
+ end
199
+
200
+ it 'is upper unbounded' do
201
+ @at.range.should be_upper_unbounded
202
+ end
203
+ end
204
+
205
+ # data_attr 12 was skipped
206
+
207
+ context '12th attribute yyyy-mm-dd; 2000-01-01' do
208
+ before(:all) do
209
+ @at = attr(12)
210
+ end
211
+
212
+ it 'pattern is yyyy-mm-dd' do
213
+ @at.pattern.should == 'yyyy-mm-dd'
214
+ end
215
+
216
+ it 'has assumed_value' do
217
+ @at.should have_assumed_value
218
+ end
219
+
220
+ it 'assumed value is 2000-01-01' do
221
+ @at.assumed_value.value.should == '2000-01-01'
222
+ end
223
+ end
224
+
225
+ context '13th attribute yyyy-mm-dd; 2001-01-01' do
226
+ before(:all) do
227
+ @at = attr(13)
228
+ end
229
+
230
+ it 'pattern is yyyy-??-??' do
231
+ @at.pattern.should == 'yyyy-??-??'
232
+ end
233
+
234
+ it 'assumed value is 2001-01-01' do
235
+ @at.assumed_value.value.should == '2001-01-01'
236
+ end
237
+ end
238
+
239
+ context '14th attribute yyyy-mm-??' do
240
+ before(:all) do
241
+ @at = attr(14)
242
+ end
243
+
244
+ it 'pattern is yyyy-mm-??; 2002-01-01' do
245
+ @at.pattern.should == 'yyyy-mm-??'
246
+ end
247
+
248
+ it 'assumed value is 2002-01-01' do
249
+ @at.assumed_value.value.should == '2002-01-01'
250
+ end
251
+ end
252
+
253
+ context '15th attribute yyyy-??-XX; 2003-01-01' do
254
+ before(:all) do
255
+ @at = attr(15)
256
+ end
257
+
258
+ it ' pattern is yyyy-??-XX' do
259
+ @at.pattern.should == 'yyyy-??-XX'
260
+ end
261
+
262
+ it 'assumed value is 2003-01-01' do
263
+ @at.assumed_value.value.should == '2003-01-01'
264
+ end
265
+ end
266
+
267
+ context '16th attribute 1983-12-25; 2004-01-01' do
268
+ before(:all) do
269
+ @at = attr(16)
270
+ end
271
+
272
+ it '1st item of list is 1983-12-25' do
273
+ @at.list[0].value.should == '1983-12-25'
274
+ end
275
+
276
+ it 'assumed value is 2004-01-01' do
277
+ @at.assumed_value.value.should == '2004-01-01'
278
+ end
279
+ end
280
+
281
+ context '17th attribute 2000-01-01; 2005-01-01' do
282
+ before(:all) do
283
+ @at = attr(17)
284
+ end
285
+
286
+ it '1st item of list is 2000-01-01' do
287
+ @at.list[0].value.should == '2000-01-01'
288
+ end
289
+
290
+ it 'assumed value is 2005-01-01' do
291
+ @at.assumed_value.value.should == '2005-01-01'
292
+ end
293
+ end
294
+
295
+ context '18th attribute |2004-09-20..2004-10-20; 2004-09-30|' do
296
+ before(:all) do
297
+ @at = attr(18)
298
+ end
299
+
300
+ it 'lower range is 2004-09-20' do
301
+ @at.range.lower.value.should == '2004-09-20'
302
+ end
303
+
304
+ it 'upper range is 2004-10-20' do
305
+ @at.range.upper.value.should == '2004-10-20'
306
+ end
307
+
308
+ it 'is lower included' do
309
+ @at.range.should be_lower_included
310
+ end
311
+
312
+ it 'is upper included' do
313
+ @at.range.should be_upper_included
314
+ end
315
+
316
+ it 'assumed value is 2004-09-30' do
317
+ @at.assumed_value.value.should == '2004-09-30'
318
+ end
319
+ end
320
+
321
+ context '19th attribute |< 2004-09-20|; 2004-09-01' do
322
+ before(:all) do
323
+ @at = attr(19)
324
+ end
325
+
326
+ it 'upper range is 2004-09-20' do
327
+ @at.range.upper.value.should == '2004-09-20'
328
+ end
329
+
330
+ it 'is not upper included' do
331
+ @at.range.should_not be_upper_included
332
+ end
333
+
334
+ it 'is lower unbounded' do
335
+ @at.range.should be_lower_unbounded
336
+ end
337
+
338
+ it 'assumed value is 2004-09-01' do
339
+ @at.assumed_value.value.should == '2004-09-01'
340
+ end
341
+ end
342
+
343
+ context '20th attribute |<= 2004-09-20|; 2003-09-20' do
344
+ before(:all) do
345
+ @at = attr(20)
346
+ end
347
+
348
+ it 'upper range is 2004-09-20' do
349
+ @at.range.upper.value.should == '2004-09-20'
350
+ end
351
+
352
+ it 'is upper included' do
353
+ @at.range.should be_upper_included
354
+ end
355
+
356
+ it 'is lower unbounded' do
357
+ @at.range.should be_lower_unbounded
358
+ end
359
+
360
+ it 'assumed value is 2003-09-20' do
361
+ @at.assumed_value.value.should == '2003-09-20'
362
+ end
363
+ end
364
+
365
+ context '21st attribute |> 2004-09-20|; 2005-01-02' do
366
+ before(:all) do
367
+ @at = attr(21)
368
+ end
369
+
370
+ it 'lower range is 2004-09-20' do
371
+ @at.range.lower.value.should == '2004-09-20'
372
+ end
373
+
374
+ it 'is not lower included' do
375
+ @at.range.should_not be_lower_included
376
+ end
377
+
378
+ it 'is upper unbounded' do
379
+ @at.range.should be_upper_unbounded
380
+ end
381
+
382
+ it 'assumed value is 2005-01-02' do
383
+ @at.assumed_value.value.should == '2005-01-02'
384
+ end
385
+ end
386
+
387
+ context '22nd attribute |>= 2004-09-20|; 2005-10-30' do
388
+ before(:all) do
389
+ @at = attr(22)
390
+ end
391
+
392
+ it 'lower range is 2004-09-20' do
393
+ @at.range.lower.value.should == '2004-09-20'
394
+ end
395
+
396
+ it 'is lower included' do
397
+ @at.range.should be_lower_included
398
+ end
399
+
400
+ it 'is upper unbounded' do
401
+ @at.range.should be_upper_unbounded
402
+ end
403
+
404
+ it 'assumed value is 2005-10-30' do
405
+ @at.assumed_value.value.should == '2005-10-30'
406
+ end
407
+ end
408
+
409
+ context '23rd attribute |2004-09-20|' do
410
+ before(:all) do
411
+ @at = attr(23)
412
+ end
413
+
414
+ it 'lower range is 2004-09-20' do
415
+ @at.range.lower.value.should == '2004-09-20'
416
+ end
417
+
418
+ it 'upper range is 2004-09-20' do
419
+ @at.range.upper.value.should == '2004-09-20'
420
+ end
421
+
422
+ it 'is lower included' do
423
+ @at.range.should be_lower_included
424
+ end
425
+
426
+ it 'is upper included' do
427
+ @at.range.should be_upper_included
428
+ end
429
+ end
430
+ end
431
+
432
+ context 'Time type' do
433
+ before(:all) do
434
+ @constraints = const(1)
435
+ end
436
+
437
+ context '1st attribute hh:mm:ss' do
438
+ before(:all) do
439
+ @at = attr(1)
440
+ end
441
+
442
+ it 'pattern is hh:mm:ss' do
443
+ @at.pattern.should == 'hh:mm:ss'
444
+ end
445
+
446
+ it 'does not have assumed_value' do
447
+ @at.should_not have_assumed_value
448
+ end
449
+ end
450
+
451
+ context '2nd attribute hh:mm:XX' do
452
+ before(:all) do
453
+ @at = attr(2)
454
+ end
455
+
456
+ it 'pattern is hh:mm:XX' do
457
+ @at.pattern.should == 'hh:mm:XX'
458
+ end
459
+ end
460
+
461
+ context '3rd attribute hh:??:XX' do
462
+ before(:all) do
463
+ @at = attr(3)
464
+ end
465
+
466
+ it 'pattern is hh:??:XX' do
467
+ @at.pattern.should == 'hh:??:XX'
468
+ end
469
+ end
470
+
471
+ context '4th attribute hh:??:??' do
472
+ before(:all) do
473
+ @at = attr(4)
474
+ end
475
+
476
+ it 'pattern is hh:??:??' do
477
+ @at.pattern.should == 'hh:??:??'
478
+ end
479
+ end
480
+
481
+ context '5th attribute 22:00:05' do
482
+ before(:all) do
483
+ @at = attr(5)
484
+ end
485
+
486
+ it '1st item of the list is 22:00:05' do
487
+ @at.list[0].value.should == '22:00:05'
488
+ end
489
+
490
+ it 'does not have assumed_value' do
491
+ @at.should_not have_assumed_value
492
+ end
493
+ end
494
+
495
+ context '6th attribute 00:00:59' do
496
+ before(:all) do
497
+ @at = attr(6)
498
+ end
499
+
500
+ it '1st item of the list is 00:00:59' do
501
+ @at.list[0].value.should == '00:00:59'
502
+ end
503
+ end
504
+
505
+ context '7th attribute 12:35' do
506
+ before(:all) do
507
+ @at = attr(7)
508
+ end
509
+
510
+ it '1st item of the list is 12:35' do
511
+ @at.list[0].value.should == '12:35'
512
+ end
513
+ end
514
+
515
+ context '8th attribute 12:35:45,666' do
516
+ before(:all) do
517
+ @at = attr(8)
518
+ end
519
+
520
+ it '1st item of the list is 12:35:45,666' do
521
+ @at.list[0].value.should == '12:35:45,666'
522
+ end
523
+ end
524
+
525
+ context '8th attribute 12:35:45,666' do
526
+ before(:all) do
527
+ @at = attr(8)
528
+ end
529
+
530
+ it '1st item of the list is 12:35:45,666' do
531
+ @at.list[0].value.should == '12:35:45,666'
532
+ end
533
+ end
534
+
535
+ context '9th attribute 12:35:45-0700' do
536
+ before(:all) do
537
+ @at = attr(9)
538
+ end
539
+
540
+ it '1st item of the list is 12:35:45-0700' do
541
+ @at.list[0].value.should == '12:35:45-0700'
542
+ end
543
+
544
+ it 'time zone is -0700' do
545
+ @at.list[0].timezone.should == '-0700'
546
+ end
547
+ end
548
+
549
+ context '10th attribute 12:35:45+0800' do
550
+ before(:all) do
551
+ @at = attr(10)
552
+ end
553
+
554
+ it '1st item of the list is 12:35:45+0800' do
555
+ @at.list[0].value.should == '12:35:45+0800'
556
+ end
557
+
558
+ it 'time zone is +0800' do
559
+ @at.list[0].timezone.should == '+0800'
560
+ end
561
+ end
562
+
563
+ context '11th attribute 12:35:45,999-0700' do
564
+ before(:all) do
565
+ @at = attr(11)
566
+ end
567
+
568
+ it '1st item of the list is 12:35:45,999-0700' do
569
+ @at.list[0].value.should == '12:35:45,999-0700'
570
+ end
571
+
572
+ it 'time zone is -0700' do
573
+ @at.list[0].timezone.should == '-0700'
574
+ end
575
+ end
576
+
577
+ context '12th attribute 12:35:45,000+0800' do
578
+ before(:all) do
579
+ @at = attr(12)
580
+ end
581
+
582
+ it '1st item of the list is 12:35:45,000+0800' do
583
+ @at.list[0].value.should == '12:35:45,000+0800'
584
+ end
585
+
586
+ it 'time zone is +0800' do
587
+ @at.list[0].timezone.should == '+0800'
588
+ end
589
+
590
+ it 'fractional second is 0' do
591
+ @at.list[0].fractional_second == 0
592
+ end
593
+ end
594
+
595
+ context '13th attribute 12:35:45,000Z' do
596
+ before(:all) do
597
+ @at = attr(13)
598
+ end
599
+
600
+ it '1st item of the list is 12:35:45,000Z' do
601
+ @at.list[0].value.should == '12:35:45,000Z'
602
+ end
603
+
604
+ it 'time zone is +0800' do
605
+ @at.list[0].timezone.should == 'Z'
606
+ end
607
+
608
+ it 'fractional second is 0' do
609
+ @at.list[0].fractional_second == 0
610
+ end
611
+ end
612
+
613
+ context '14th attribute 12:35:45,995-0700' do
614
+ before(:all) do
615
+ @at = attr(14)
616
+ end
617
+
618
+ it '1st item of the list is 12:35:45,995-0700' do
619
+ @at.list[0].value.should == '12:35:45,995-0700'
620
+ end
621
+
622
+ it 'time zone is -0700' do
623
+ @at.list[0].timezone.should == '-0700'
624
+ end
625
+
626
+ it 'fractional second is 995' do
627
+ @at.list[0].fractional_second == 0.995
628
+ end
629
+ end
630
+
631
+ context '15th attribute 12:35:45,001+0800' do
632
+ before(:all) do
633
+ @at = attr(15)
634
+ end
635
+
636
+ it '1st item of the list is 12:35:45,001+0800' do
637
+ @at.list[0].value.should == '12:35:45,001+0800'
638
+ end
639
+
640
+ it 'time zone is -0700' do
641
+ @at.list[0].timezone.should == '+0800'
642
+ end
643
+
644
+ it 'fractional second is 0.001' do
645
+ @at.list[0].fractional_second == 0.001
646
+ end
647
+ end
648
+
649
+ context '15th attribute 12:35:45,001+0800' do
650
+ before(:all) do
651
+ @at = attr(15)
652
+ end
653
+
654
+ it '1st item of the list is 12:35:45,001+0800' do
655
+ @at.list[0].value.should == '12:35:45,001+0800'
656
+ end
657
+
658
+ it 'time zone is -0700' do
659
+ @at.list[0].timezone.should == '+0800'
660
+ end
661
+
662
+ it 'fractional second is 0.001' do
663
+ @at.list[0].fractional_second == 0.001
664
+ end
665
+ end
666
+
667
+ context '16th attribute |12:35..16:35|' do
668
+ before(:all) do
669
+ @at = attr(16)
670
+ end
671
+
672
+ it 'lower range is 12:35' do
673
+ @at.range.lower.value.should == '12:35'
674
+ end
675
+
676
+ it 'upper range is 12:35' do
677
+ @at.range.upper.value.should == '16:35'
678
+ end
679
+
680
+ it 'is lower included' do
681
+ @at.range.should be_lower_included
682
+ end
683
+
684
+ it 'is upper included' do
685
+ @at.range.should be_upper_included
686
+ end
687
+ end
688
+
689
+ context '17th attribute |< 12:35|' do
690
+ before(:all) do
691
+ @at = attr(17)
692
+ end
693
+
694
+ it 'upper range is 12:35' do
695
+ @at.range.upper.value.should == '12:35'
696
+ end
697
+
698
+ it 'is lower unbounded' do
699
+ @at.range.should be_lower_unbounded
700
+ end
701
+
702
+ it 'is not upper included' do
703
+ @at.range.should_not be_upper_included
704
+ end
705
+ end
706
+
707
+ context '18th attribute |<= 12:35|' do
708
+ before(:all) do
709
+ @at = attr(18)
710
+ end
711
+
712
+ it 'upper range is 12:35' do
713
+ @at.range.upper.value.should == '12:35'
714
+ end
715
+
716
+ it 'is lower unbounded' do
717
+ @at.range.should be_lower_unbounded
718
+ end
719
+
720
+ it 'is upper included' do
721
+ @at.range.should be_upper_included
722
+ end
723
+ end
724
+
725
+ context '19th attribute |> 12:35|' do
726
+ before(:all) do
727
+ @at = attr(19)
728
+ end
729
+
730
+ it 'lower range is 12:35' do
731
+ @at.range.lower.value.should == '12:35'
732
+ end
733
+
734
+ it 'is upper unbounded' do
735
+ @at.range.should be_upper_unbounded
736
+ end
737
+
738
+ it 'is not lower included' do
739
+ @at.range.should_not be_upper_included
740
+ end
741
+ end
742
+
743
+ context '19th attribute |> 12:35|' do
744
+ before(:all) do
745
+ @at = attr(19)
746
+ end
747
+
748
+ it 'lower range is 12:35' do
749
+ @at.range.lower.value.should == '12:35'
750
+ end
751
+
752
+ it 'is upper unbounded' do
753
+ @at.range.should be_upper_unbounded
754
+ end
755
+
756
+ it 'is not lower included' do
757
+ @at.range.should_not be_lower_included
758
+ end
759
+ end
760
+
761
+ context '20th attribute |>= 12:35|' do
762
+ before(:all) do
763
+ @at = attr(20)
764
+ end
765
+
766
+ it 'lower range is 12:35' do
767
+ @at.range.lower.value.should == '12:35'
768
+ end
769
+
770
+ it 'is upper unbounded' do
771
+ @at.range.should be_upper_unbounded
772
+ end
773
+
774
+ it 'is lower included' do
775
+ @at.range.should be_lower_included
776
+ end
777
+ end
778
+
779
+ context '21st attribute hh:mm:ss; 10:00:00' do
780
+ before(:all) do
781
+ @at = attr(21)
782
+ end
783
+
784
+ it 'pattern is hh:mm:ss' do
785
+ @at.pattern.should == 'hh:mm:ss'
786
+ end
787
+
788
+ it 'has assumed_value' do
789
+ @at.should have_assumed_value
790
+ end
791
+
792
+ it 'assumed value is 10:00:00' do
793
+ @at.assumed_value.value.should == '10:00:00'
794
+ end
795
+ end
796
+
797
+ context '22nd attribute hh:mm:XX; 10:00:00' do
798
+ before(:all) do
799
+ @at = attr(22)
800
+ end
801
+
802
+ it 'pattern is hh:mm:XX' do
803
+ @at.pattern.should == 'hh:mm:XX'
804
+ end
805
+
806
+ it 'assumed value is 10:00:00' do
807
+ @at.assumed_value.value.should == '10:00:00'
808
+ end
809
+ end
810
+
811
+ context '23rd attribute hh:??:XX; 10:00:00' do
812
+ before(:all) do
813
+ @at = attr(23)
814
+ end
815
+
816
+ it 'pattern is hh:??:XX' do
817
+ @at.pattern.should == 'hh:??:XX'
818
+ end
819
+
820
+ it 'assumed value is 10:00:00' do
821
+ @at.assumed_value.value.should == '10:00:00'
822
+ end
823
+ end
824
+
825
+ context '24th attribute hh:??:??; 10:00:00' do
826
+ before(:all) do
827
+ @at = attr(24)
828
+ end
829
+
830
+ it 'pattern is hh:??:??' do
831
+ @at.pattern.should == 'hh:??:??'
832
+ end
833
+
834
+ it 'assumed value is 10:00:00' do
835
+ @at.assumed_value.value.should == '10:00:00'
836
+ end
837
+ end
838
+
839
+ context '25th attribute 22:00:05; 10:00:00' do
840
+ before(:all) do
841
+ @at = attr(25)
842
+ end
843
+
844
+ it '1st item of the list is 22:00:05' do
845
+ @at.list[0].value.should == '22:00:05'
846
+ end
847
+
848
+ it 'have assumed_value' do
849
+ @at.should have_assumed_value
850
+ end
851
+
852
+ it 'assumed value is 10:00:00' do
853
+ @at.assumed_value.value.should == '10:00:00'
854
+ end
855
+ end
856
+
857
+ context '26th attribute 00:00:59; 10:00:00' do
858
+ before(:all) do
859
+ @at = attr(26)
860
+ end
861
+
862
+ it '1st item of the list is 00:00:59' do
863
+ @at.list[0].value.should == '00:00:59'
864
+ end
865
+
866
+ it 'assumed value is 10:00:00' do
867
+ @at.assumed_value.value.should == '10:00:00'
868
+ end
869
+ end
870
+
871
+ context '27th attribute 12:35' do
872
+ before(:all) do
873
+ @at = attr(27)
874
+ end
875
+
876
+ it '1st item of the list is 12:35 10:00:00' do
877
+ @at.list[0].value.should == '12:35'
878
+ end
879
+
880
+ it 'assumed value is 10:00:00' do
881
+ @at.assumed_value.value.should == '10:00:00'
882
+ end
883
+ end
884
+
885
+ context '28th attribute 12:35:45,666; 10:00:00' do
886
+ before(:all) do
887
+ @at = attr(28)
888
+ end
889
+
890
+ it '1st item of the list is 12:35:45,666' do
891
+ @at.list[0].value.should == '12:35:45,666'
892
+ end
893
+
894
+ it 'assumed value is 10:00:00' do
895
+ @at.assumed_value.value.should == '10:00:00'
896
+ end
897
+ end
898
+
899
+ context '29th attribute 12:35:45-0700; 10:00:00' do
900
+ before(:all) do
901
+ @at = attr(29)
902
+ end
903
+
904
+ it '1st item of the list is 12:35:45-0700' do
905
+ @at.list[0].value.should == '12:35:45-0700'
906
+ end
907
+
908
+ it 'time zone is -0700' do
909
+ @at.list[0].timezone.should == '-0700'
910
+ end
911
+
912
+ it 'assumed value is 10:00:00' do
913
+ @at.assumed_value.value.should == '10:00:00'
914
+ end
915
+ end
916
+
917
+ context '30th attribute 12:35:45+0800; 10:00:00' do
918
+ before(:all) do
919
+ @at = attr(30)
920
+ end
921
+
922
+ it '1st item of the list is 12:35:45+0800' do
923
+ @at.list[0].value.should == '12:35:45+0800'
924
+ end
925
+
926
+ it 'time zone is +0800' do
927
+ @at.list[0].timezone.should == '+0800'
928
+ end
929
+
930
+ it 'assumed value is 10:00:00' do
931
+ @at.assumed_value.value.should == '10:00:00'
932
+ end
933
+ end
934
+
935
+ context '32th attribute 12:35:45,000+0800; 10:00:00' do
936
+ before(:all) do
937
+ @at = attr(32)
938
+ end
939
+
940
+ it '1st item of the list is 12:35:45,000+0800' do
941
+ @at.list[0].value.should == '12:35:45,000+0800'
942
+ end
943
+
944
+ it 'time zone is +0800' do
945
+ @at.list[0].timezone.should == '+0800'
946
+ end
947
+
948
+ it 'fractional second is 0' do
949
+ @at.list[0].fractional_second == 0
950
+ end
951
+
952
+ it 'assumed value is 10:00:00' do
953
+ @at.assumed_value.value.should == '10:00:00'
954
+ end
955
+ end
956
+
957
+ context '33th attribute 12:35:45,000Z; 10:00:00' do
958
+ before(:all) do
959
+ @at = attr(33)
960
+ end
961
+
962
+ it '1st item of the list is 12:35:45,000Z' do
963
+ @at.list[0].value.should == '12:35:45,000Z'
964
+ end
965
+
966
+ it 'time zone is +0800' do
967
+ @at.list[0].timezone.should == 'Z'
968
+ end
969
+
970
+ it 'fractional second is 0' do
971
+ @at.list[0].fractional_second == 0
972
+ end
973
+
974
+ it 'assumed value is 10:00:00' do
975
+ @at.assumed_value.value.should == '10:00:00'
976
+ end
977
+ end
978
+
979
+ context '34th attribute 12:35:45,995-0700; 10:00:00' do
980
+ before(:all) do
981
+ @at = attr(34)
982
+ end
983
+
984
+ it '1st item of the list is 12:35:45,995-0700' do
985
+ @at.list[0].value.should == '12:35:45,995-0700'
986
+ end
987
+
988
+ it 'time zone is -0700' do
989
+ @at.list[0].timezone.should == '-0700'
990
+ end
991
+
992
+ it 'fractional second is 995' do
993
+ @at.list[0].fractional_second == 0.995
994
+ end
995
+
996
+ it 'assumed value is 10:00:00' do
997
+ @at.assumed_value.value.should == '10:00:00'
998
+ end
999
+ end
1000
+
1001
+ context '35th attribute 12:35:45,001+0800; 10:00:00' do
1002
+ before(:all) do
1003
+ @at = attr(35)
1004
+ end
1005
+
1006
+ it '1st item of the list is 12:35:45,001+0800' do
1007
+ @at.list[0].value.should == '12:35:45,001+0800'
1008
+ end
1009
+
1010
+ it 'time zone is -0700' do
1011
+ @at.list[0].timezone.should == '+0800'
1012
+ end
1013
+
1014
+ it 'fractional second is 0.001' do
1015
+ @at.list[0].fractional_second == 0.001
1016
+ end
1017
+
1018
+ it 'assumed value is 10:00:00' do
1019
+ @at.assumed_value.value.should == '10:00:00'
1020
+ end
1021
+ end
1022
+
1023
+ context '36th attribute |12:35..16:35|; 10:00:00' do
1024
+ before(:all) do
1025
+ @at = attr(36)
1026
+ end
1027
+
1028
+ it 'lower range is 12:35' do
1029
+ @at.range.lower.value.should == '12:35'
1030
+ end
1031
+
1032
+ it 'upper range is 12:35' do
1033
+ @at.range.upper.value.should == '16:35'
1034
+ end
1035
+
1036
+ it 'is lower included' do
1037
+ @at.range.should be_lower_included
1038
+ end
1039
+
1040
+ it 'is upper included' do
1041
+ @at.range.should be_upper_included
1042
+ end
1043
+
1044
+ it 'assumed value is 10:00:00' do
1045
+ @at.assumed_value.value.should == '10:00:00'
1046
+ end
1047
+ end
1048
+
1049
+ context '37th attribute |< 12:35|; 10:00:00' do
1050
+ before(:all) do
1051
+ @at = attr(37)
1052
+ end
1053
+
1054
+ it 'upper range is 12:35' do
1055
+ @at.range.upper.value.should == '12:35'
1056
+ end
1057
+
1058
+ it 'is lower unbounded' do
1059
+ @at.range.should be_lower_unbounded
1060
+ end
1061
+
1062
+ it 'is not upper included' do
1063
+ @at.range.should_not be_upper_included
1064
+ end
1065
+
1066
+ it 'assumed value is 10:00:00' do
1067
+ @at.assumed_value.value.should == '10:00:00'
1068
+ end
1069
+ end
1070
+
1071
+ context '38th attribute |<= 12:35|; 10:00:00' do
1072
+ before(:all) do
1073
+ @at = attr(38)
1074
+ end
1075
+
1076
+ it 'upper range is 12:35' do
1077
+ @at.range.upper.value.should == '12:35'
1078
+ end
1079
+
1080
+ it 'is lower unbounded' do
1081
+ @at.range.should be_lower_unbounded
1082
+ end
1083
+
1084
+ it 'is upper included' do
1085
+ @at.range.should be_upper_included
1086
+ end
1087
+
1088
+ it 'assumed value is 10:00:00' do
1089
+ @at.assumed_value.value.should == '10:00:00'
1090
+ end
1091
+ end
1092
+
1093
+ context '39th attribute |> 12:35|; 10:00:00' do
1094
+ before(:all) do
1095
+ @at = attr(39)
1096
+ end
1097
+
1098
+ it 'lower range is 12:35' do
1099
+ @at.range.lower.value.should == '12:35'
1100
+ end
1101
+
1102
+ it 'is upper unbounded' do
1103
+ @at.range.should be_upper_unbounded
1104
+ end
1105
+
1106
+ it 'is not lower included' do
1107
+ @at.range.should_not be_upper_included
1108
+ end
1109
+
1110
+ it 'assumed value is 10:00:00' do
1111
+ @at.assumed_value.value.should == '10:00:00'
1112
+ end
1113
+ end
1114
+
1115
+ context '40th attribute |>= 12:35|; 10:00:00' do
1116
+ before(:all) do
1117
+ @at = attr(40)
1118
+ end
1119
+
1120
+ it 'lower range is 12:35' do
1121
+ @at.range.lower.value.should == '12:35'
1122
+ end
1123
+
1124
+ it 'is upper unbounded' do
1125
+ @at.range.should be_upper_unbounded
1126
+ end
1127
+
1128
+ it 'is lower included' do
1129
+ @at.range.should be_lower_included
1130
+ end
1131
+
1132
+ it 'assumed value is 10:00:00' do
1133
+ @at.assumed_value.value.should == '10:00:00'
1134
+ end
1135
+ end
1136
+
1137
+ context '41st attribute |12:35|' do
1138
+ before(:all) do
1139
+ @at = attr(41)
1140
+ end
1141
+
1142
+ it 'lower range is 12:35' do
1143
+ @at.range.lower.value.should == '12:35'
1144
+ end
1145
+
1146
+ it 'upper range is 12:35' do
1147
+ @at.range.lower.value.should == '12:35'
1148
+ end
1149
+
1150
+ it 'is upper included' do
1151
+ @at.range.should be_upper_included
1152
+ end
1153
+
1154
+ it 'is lower included' do
1155
+ @at.range.should be_lower_included
1156
+ end
1157
+
1158
+ it 'is not upper unbounded' do
1159
+ @at.range.should_not be_upper_unbounded
1160
+ end
1161
+
1162
+ it 'is not lower unbounded' do
1163
+ @at.range.should_not be_lower_unbounded
1164
+ end
1165
+ end
1166
+
1167
+ context '42nd attribute 00:00:59,0' do
1168
+ before(:all) do
1169
+ @at = attr(42)
1170
+ end
1171
+
1172
+ it '1st item of the list is 00:00:59,0' do
1173
+ @at.list[0].value.should == '00:00:59,0'
1174
+ end
1175
+ end
1176
+ end
1177
+
1178
+ context 'DateTime type' do
1179
+ before(:all) do
1180
+ @constraints = const(2)
1181
+ end
1182
+
1183
+ context '1st attribute yyyy-mm-dd hh:mm:ss' do
1184
+ before(:all) do
1185
+ @at = attr(1)
1186
+ end
1187
+
1188
+ it 'pattern is yyyy-mm-dd hh:mm:ss' do
1189
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:ss'
1190
+ end
1191
+
1192
+ it 'does not have assumed_value' do
1193
+ @at.should_not have_assumed_value
1194
+ end
1195
+ end
1196
+
1197
+ context '2nd attribute yyyy-mm-dd hh:mm:??' do
1198
+ before(:all) do
1199
+ @at = attr(2)
1200
+ end
1201
+
1202
+ it 'pattern is yyyy-mm-dd hh:mm:??' do
1203
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:??'
1204
+ end
1205
+ end
1206
+
1207
+ context '3rd attribute yyyy-mm-dd hh:mm:XX' do
1208
+ before(:all) do
1209
+ @at = attr(3)
1210
+ end
1211
+
1212
+ it 'pattern is yyyy-mm-dd hh:mm:XX' do
1213
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:XX'
1214
+ end
1215
+ end
1216
+
1217
+ context '4th attribute yyyy-mm-dd hh:??:XX' do
1218
+ before(:all) do
1219
+ @at = attr(4)
1220
+ end
1221
+
1222
+ it 'pattern is yyyy-mm-dd hh:??:XX' do
1223
+ @at.pattern.should == 'yyyy-mm-dd hh:??:XX'
1224
+ end
1225
+ end
1226
+
1227
+ context '5th attribute yyyy-??-?? ??:??:??' do
1228
+ before(:all) do
1229
+ @at = attr(5)
1230
+ end
1231
+
1232
+ it 'pattern is yyyy-mm-dd hh:??:XX' do
1233
+ @at.pattern.should == 'yyyy-??-?? ??:??:??'
1234
+ end
1235
+ end
1236
+
1237
+ context '6th attribute 1983-12-25T22:00:05' do
1238
+ before(:all) do
1239
+ @at = attr(6)
1240
+ end
1241
+
1242
+ it '1st item of list is 1983-12-25T22:00:05' do
1243
+ @at.list[0].value.should == '1983-12-25T22:00:05'
1244
+ end
1245
+ end
1246
+
1247
+ context '7th attribute 2000-01-01T00:00:59' do
1248
+ before(:all) do
1249
+ @at = attr(7)
1250
+ end
1251
+
1252
+ it '1st item of list is 2000-01-01T00:00:59' do
1253
+ @at.list[0].value.should == '2000-01-01T00:00:59'
1254
+ end
1255
+ end
1256
+
1257
+ context '7th attribute 2000-01-01T00:00:59' do
1258
+ before(:all) do
1259
+ @at = attr(7)
1260
+ end
1261
+
1262
+ it '1st item of list is 2000-01-01T00:00:59' do
1263
+ @at.list[0].value.should == '2000-01-01T00:00:59'
1264
+ end
1265
+ end
1266
+
1267
+ context '8th attribute 2000-01-01T00:00:59' do
1268
+ before(:all) do
1269
+ @at = attr(8)
1270
+ end
1271
+
1272
+ it '1st item of list is 2000-01-01T00:00:59' do
1273
+ @at.list[0].value.should == '2000-01-01T00:00:59'
1274
+ end
1275
+ end
1276
+
1277
+ context '9th attribute 2000-01-01T00:00:59,105' do
1278
+ before(:all) do
1279
+ @at = attr(9)
1280
+ end
1281
+
1282
+ it '1st item of list is 2000-01-01T00:00:59,105' do
1283
+ @at.list[0].value.should == '2000-01-01T00:00:59,105'
1284
+ end
1285
+
1286
+ it 'fractional second is 0.105' do
1287
+ @at.list[0].fractional_second.should == 0.105
1288
+ end
1289
+ end
1290
+
1291
+ context '10th attribute 2000-01-01T00:00:59Z' do
1292
+ before(:all) do
1293
+ @at = attr(10)
1294
+ end
1295
+
1296
+ it '1st item of list is 2000-01-01T00:00:59Z' do
1297
+ @at.list[0].value.should == '2000-01-01T00:00:59Z'
1298
+ end
1299
+
1300
+ it 'timezone is Z' do
1301
+ @at.list[0].timezone.should == 'Z'
1302
+ end
1303
+ end
1304
+
1305
+
1306
+ context '11th attribute 2000-01-01T00:00:59+1200' do
1307
+ before(:all) do
1308
+ @at = attr(11)
1309
+ end
1310
+
1311
+ it '1st item of list is 2000-01-01T00:00:59+1200' do
1312
+ @at.list[0].value.should == '2000-01-01T00:00:59+1200'
1313
+ end
1314
+
1315
+ it 'timezone is +1200' do
1316
+ @at.list[0].timezone.should == '+1200'
1317
+ end
1318
+ end
1319
+
1320
+ context '12th attribute 2000-01-01T00:00:59,500Z' do
1321
+ before(:all) do
1322
+ @at = attr(12)
1323
+ end
1324
+
1325
+ it '1st item of list is 2000-01-01T00:00:59,500Z' do
1326
+ @at.list[0].value.should == '2000-01-01T00:00:59,500Z'
1327
+ end
1328
+
1329
+ it 'fractional second is 0.500' do
1330
+ @at.list[0].fractional_second.should == 0.500
1331
+ end
1332
+
1333
+ it 'timezone is Z' do
1334
+ @at.list[0].timezone.should == 'Z'
1335
+ end
1336
+ end
1337
+
1338
+ context '13th attribute 2000-01-01T00:00:59,500+1200' do
1339
+ before(:all) do
1340
+ @at = attr(13)
1341
+ end
1342
+
1343
+ it '1st item of list is 2000-01-01T00:00:59,500+1200' do
1344
+ @at.list[0].value.should == '2000-01-01T00:00:59,500+1200'
1345
+ end
1346
+
1347
+ it 'fractional second is 0.500' do
1348
+ @at.list[0].fractional_second.should == 0.500
1349
+ end
1350
+
1351
+ it 'timezone is Z' do
1352
+ @at.list[0].timezone.should == '+1200'
1353
+ end
1354
+ end
1355
+
1356
+ context '13th attribute 2000-01-01T00:00:59,500+1200' do
1357
+ before(:all) do
1358
+ @at = attr(13)
1359
+ end
1360
+
1361
+ it '1st item of list is 2000-01-01T00:00:59,500+1200' do
1362
+ @at.list[0].value.should == '2000-01-01T00:00:59,500+1200'
1363
+ end
1364
+
1365
+ it 'fractional second is 0.500' do
1366
+ @at.list[0].fractional_second.should == 0.500
1367
+ end
1368
+
1369
+ it 'timezone is +1200' do
1370
+ @at.list[0].timezone.should == '+1200'
1371
+ end
1372
+ end
1373
+
1374
+ context '14th attribute 2000-01-01T00:00:59,000Z' do
1375
+ before(:all) do
1376
+ @at = attr(14)
1377
+ end
1378
+
1379
+ it '1st item of list is 2000-01-01T00:00:59,000Z' do
1380
+ @at.list[0].value.should == '2000-01-01T00:00:59,000Z'
1381
+ end
1382
+
1383
+ it 'fractional second is 0' do
1384
+ @at.list[0].fractional_second.should == 0
1385
+ end
1386
+
1387
+ it 'timezone is Z' do
1388
+ @at.list[0].timezone.should == 'Z'
1389
+ end
1390
+ end
1391
+
1392
+ context '15th attribute 2000-01-01T00:00:59,000+1200' do
1393
+ before(:all) do
1394
+ @at = attr(15)
1395
+ end
1396
+
1397
+ it '1st item of list is 2000-01-01T00:00:59,000+1200' do
1398
+ @at.list[0].value.should == '2000-01-01T00:00:59,000+1200'
1399
+ end
1400
+
1401
+ it 'fractional second is 0' do
1402
+ @at.list[0].fractional_second.should == 0
1403
+ end
1404
+
1405
+ it 'timezone is +1200' do
1406
+ @at.list[0].timezone.should == '+1200'
1407
+ end
1408
+ end
1409
+
1410
+ context '16th attribute |2000-01-01T00:00:00..2000-01-02T00:00:00|' do
1411
+ before(:all) do
1412
+ @at = attr(16)
1413
+ end
1414
+
1415
+ it 'lower range is 2000-01-01T00:00:00' do
1416
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1417
+ end
1418
+
1419
+ it 'upper range is 2000-01-02T00:00:00' do
1420
+ @at.range.upper.value.should == '2000-01-02T00:00:00'
1421
+ end
1422
+
1423
+ it 'is lower included' do
1424
+ @at.range.should be_lower_included
1425
+ end
1426
+
1427
+ it 'is upper included' do
1428
+ @at.range.should be_upper_included
1429
+ end
1430
+ end
1431
+
1432
+ context '17th attribute |< 2000-01-01T00:00:00|' do
1433
+ before(:all) do
1434
+ @at = attr(17)
1435
+ end
1436
+
1437
+ it 'upper range is 2000-01-01T00:00:00' do
1438
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
1439
+ end
1440
+
1441
+ it 'is not upper included' do
1442
+ @at.range.should_not be_upper_included
1443
+ end
1444
+
1445
+ it 'is lower unbounded' do
1446
+ @at.range.should be_lower_unbounded
1447
+ end
1448
+ end
1449
+
1450
+ context '18th attribute |<= 2000-01-01T00:00:00|' do
1451
+ before(:all) do
1452
+ @at = attr(18)
1453
+ end
1454
+
1455
+ it 'upper range is 2000-01-01T00:00:00' do
1456
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
1457
+ end
1458
+
1459
+ it 'is upper included' do
1460
+ @at.range.should be_upper_included
1461
+ end
1462
+
1463
+ it 'is lower unbounded' do
1464
+ @at.range.should be_lower_unbounded
1465
+ end
1466
+ end
1467
+
1468
+ context '19th attribute |> 2000-01-01T00:00:00|' do
1469
+ before(:all) do
1470
+ @at = attr(19)
1471
+ end
1472
+
1473
+ it 'lower range is 2000-01-01T00:00:00' do
1474
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1475
+ end
1476
+
1477
+ it 'is not lower included' do
1478
+ @at.range.should_not be_lower_included
1479
+ end
1480
+
1481
+ it 'is upper unbounded' do
1482
+ @at.range.should be_upper_unbounded
1483
+ end
1484
+ end
1485
+
1486
+ context '20th attribute |>= 2000-01-01T00:00:00|' do
1487
+ before(:all) do
1488
+ @at = attr(20)
1489
+ end
1490
+
1491
+ it 'lower range is 2000-01-01T00:00:00' do
1492
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1493
+ end
1494
+
1495
+ it 'is lower included' do
1496
+ @at.range.should be_lower_included
1497
+ end
1498
+
1499
+ it 'is upper unbounded' do
1500
+ @at.range.should be_upper_unbounded
1501
+ end
1502
+ end
1503
+
1504
+ context '21st attribute yyyy-mm-dd hh:mm:ss; 2006-03-31T01:12:00' do
1505
+ before(:all) do
1506
+ @at = attr(21)
1507
+ end
1508
+
1509
+ it 'pattern is yyyy-mm-dd hh:mm:ss' do
1510
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:ss'
1511
+ end
1512
+
1513
+ it 'has assumed_value' do
1514
+ @at.should have_assumed_value
1515
+ end
1516
+
1517
+ it 'assumed value is 2006-03-31T01:12:00' do
1518
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1519
+ end
1520
+ end
1521
+
1522
+ context '22nd attribute yyyy-mm-dd hh:mm:??; 2006-03-31T01:12:00' do
1523
+ before(:all) do
1524
+ @at = attr(22)
1525
+ end
1526
+
1527
+ it 'pattern is yyyy-mm-dd hh:mm:??' do
1528
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:??'
1529
+ end
1530
+
1531
+ it 'assumed value is 2006-03-31T01:12:00' do
1532
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1533
+ end
1534
+ end
1535
+
1536
+ context '23rd attribute yyyy-mm-dd hh:mm:XX; 2006-03-31T01:12:00' do
1537
+ before(:all) do
1538
+ @at = attr(23)
1539
+ end
1540
+
1541
+ it 'pattern is yyyy-mm-dd hh:mm:XX' do
1542
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:XX'
1543
+ end
1544
+
1545
+ it 'assumed value is 2006-03-31T01:12:00' do
1546
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1547
+ end
1548
+ end
1549
+
1550
+ context '24th attribute yyyy-mm-dd hh:??:XX; 2006-03-31T01:12:00' do
1551
+ before(:all) do
1552
+ @at = attr(24)
1553
+ end
1554
+
1555
+ it 'pattern is yyyy-mm-dd hh:??:XX' do
1556
+ @at.pattern.should == 'yyyy-mm-dd hh:??:XX'
1557
+ end
1558
+
1559
+ it 'assumed value is 2006-03-31T01:12:00' do
1560
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1561
+ end
1562
+ end
1563
+
1564
+ context '25th attribute yyyy-??-?? ??:??:??; 2006-03-31T01:12:00' do
1565
+ before(:all) do
1566
+ @at = attr(25)
1567
+ end
1568
+
1569
+ it 'pattern is yyyy-mm-dd hh:??:XX' do
1570
+ @at.pattern.should == 'yyyy-??-?? ??:??:??'
1571
+ end
1572
+
1573
+ it 'assumed value is 2006-03-31T01:12:00' do
1574
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1575
+ end
1576
+ end
1577
+
1578
+ context '26th attribute 1983-12-25T22:00:05; 2006-03-31T01:12:00' do
1579
+ before(:all) do
1580
+ @at = attr(26)
1581
+ end
1582
+
1583
+ it '1st item of list is 1983-12-25T22:00:05' do
1584
+ @at.list[0].value.should == '1983-12-25T22:00:05'
1585
+ end
1586
+
1587
+ it 'assumed value is 2006-03-31T01:12:00' do
1588
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1589
+ end
1590
+ end
1591
+
1592
+ context '27th attribute 2000-01-01T00:00:59; 2006-03-31T01:12:00' do
1593
+ before(:all) do
1594
+ @at = attr(27)
1595
+ end
1596
+
1597
+ it '1st item of list is 2000-01-01T00:00:59' do
1598
+ @at.list[0].value.should == '2000-01-01T00:00:59'
1599
+ end
1600
+
1601
+ it 'assumed value is 2006-03-31T01:12:00' do
1602
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1603
+ end
1604
+ end
1605
+
1606
+ context '28th attribute 2000-01-01T00:00:59,000; 2006-03-31T01:12:00' do
1607
+ before(:all) do
1608
+ @at = attr(28)
1609
+ end
1610
+
1611
+ it '1st item of list is 2000-01-01T00:00:59,000' do
1612
+ @at.list[0].value.should == '2000-01-01T00:00:59,000'
1613
+ end
1614
+
1615
+ it 'assumed value is 2006-03-31T01:12:00' do
1616
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1617
+ end
1618
+ end
1619
+
1620
+ context '29th attribute 2000-01-01T00:00:59,105; 2006-03-31T01:12:00' do
1621
+ before(:all) do
1622
+ @at = attr(29)
1623
+ end
1624
+
1625
+ it '1st item of list is 2000-01-01T00:00:59,105' do
1626
+ @at.list[0].value.should == '2000-01-01T00:00:59,105'
1627
+ end
1628
+
1629
+ it 'fractional second is 0.105' do
1630
+ @at.list[0].fractional_second.should == 0.105
1631
+ end
1632
+
1633
+ it 'assumed value is 2006-03-31T01:12:00' do
1634
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1635
+ end
1636
+ end
1637
+
1638
+ context '30th attribute 2000-01-01T00:00:59Z; 2006-03-31T01:12:00' do
1639
+ before(:all) do
1640
+ @at = attr(30)
1641
+ end
1642
+
1643
+ it '1st item of list is 2000-01-01T00:00:59Z' do
1644
+ @at.list[0].value.should == '2000-01-01T00:00:59Z'
1645
+ end
1646
+
1647
+ it 'timezone is Z' do
1648
+ @at.list[0].timezone.should == 'Z'
1649
+ end
1650
+
1651
+ it 'assumed value is 2006-03-31T01:12:00' do
1652
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1653
+ end
1654
+ end
1655
+
1656
+ context '31st attribute 2000-01-01T00:00:59+1200; 2006-03-31T01:12:00' do
1657
+ before(:all) do
1658
+ @at = attr(31)
1659
+ end
1660
+
1661
+ it '1st item of list is 2000-01-01T00:00:59+1200' do
1662
+ @at.list[0].value.should == '2000-01-01T00:00:59+1200'
1663
+ end
1664
+
1665
+ it 'timezone is Z' do
1666
+ @at.list[0].timezone.should == '+1200'
1667
+ end
1668
+
1669
+ it 'assumed value is 2006-03-31T01:12:00' do
1670
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1671
+ end
1672
+ end
1673
+
1674
+ context '32nd attribute 2000-01-01T00:00:59,500Z; 2006-03-31T01:12:00' do
1675
+ before(:all) do
1676
+ @at = attr(32)
1677
+ end
1678
+
1679
+ it '1st item of list is 2000-01-01T00:00:59,500Z' do
1680
+ @at.list[0].value.should == '2000-01-01T00:00:59,500Z'
1681
+ end
1682
+
1683
+ it 'fractional second is 0.500' do
1684
+ @at.list[0].fractional_second.should == 0.500
1685
+ end
1686
+
1687
+ it 'timezone is Z' do
1688
+ @at.list[0].timezone.should == 'Z'
1689
+ end
1690
+
1691
+ it 'assumed value is 2006-03-31T01:12:00' do
1692
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1693
+ end
1694
+ end
1695
+
1696
+ context '33th attribute 2000-01-01T00:00:59,500+1200; 2006-03-31T01:12:00' do
1697
+ before(:all) do
1698
+ @at = attr(33)
1699
+ end
1700
+
1701
+ it '1st item of list is 2000-01-01T00:00:59,500+1200' do
1702
+ @at.list[0].value.should == '2000-01-01T00:00:59,500+1200'
1703
+ end
1704
+
1705
+ it 'fractional second is 0.500' do
1706
+ @at.list[0].fractional_second.should == 0.500
1707
+ end
1708
+
1709
+ it 'timezone is Z' do
1710
+ @at.list[0].timezone.should == '+1200'
1711
+ end
1712
+
1713
+ it 'assumed value is 2006-03-31T01:12:00' do
1714
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1715
+ end
1716
+ end
1717
+
1718
+ context '34th attribute 2000-01-01T00:00:59,000Z; 2006-03-31T01:12:00' do
1719
+ before(:all) do
1720
+ @at = attr(34)
1721
+ end
1722
+
1723
+ it '1st item of list is 2000-01-01T00:00:59,000Z' do
1724
+ @at.list[0].value.should == '2000-01-01T00:00:59,000Z'
1725
+ end
1726
+
1727
+ it 'fractional second is 0' do
1728
+ @at.list[0].fractional_second.should == 0
1729
+ end
1730
+
1731
+ it 'timezone is Z' do
1732
+ @at.list[0].timezone.should == 'Z'
1733
+ end
1734
+
1735
+ it 'assumed value is 2006-03-31T01:12:00' do
1736
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1737
+ end
1738
+ end
1739
+
1740
+ context '35th attribute 2000-01-01T00:00:59,000+1200; 2006-03-31T01:12:00' do
1741
+ before(:all) do
1742
+ @at = attr(35)
1743
+ end
1744
+
1745
+ it '1st item of list is 2000-01-01T00:00:59,000+1200' do
1746
+ @at.list[0].value.should == '2000-01-01T00:00:59,000+1200'
1747
+ end
1748
+
1749
+ it 'fractional second is 0' do
1750
+ @at.list[0].fractional_second.should == 0
1751
+ end
1752
+
1753
+ it 'timezone is +1200' do
1754
+ @at.list[0].timezone.should == '+1200'
1755
+ end
1756
+
1757
+ it 'assumed value is 2006-03-31T01:12:00' do
1758
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1759
+ end
1760
+ end
1761
+
1762
+ context '36th attribute |2000-01-01T00:00:00..2000-01-02T00:00:00|; 2006-03-31T01:12:00' do
1763
+ before(:all) do
1764
+ @at = attr(36)
1765
+ end
1766
+
1767
+ it 'lower range is 2000-01-01T00:00:00' do
1768
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1769
+ end
1770
+
1771
+ it 'upper range is 2000-01-02T00:00:00' do
1772
+ @at.range.upper.value.should == '2000-01-02T00:00:00'
1773
+ end
1774
+
1775
+ it 'is lower included' do
1776
+ @at.range.should be_lower_included
1777
+ end
1778
+
1779
+ it 'is upper included' do
1780
+ @at.range.should be_upper_included
1781
+ end
1782
+
1783
+ it 'assumed value is 2006-03-31T01:12:00' do
1784
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1785
+ end
1786
+ end
1787
+
1788
+ context '37th attribute |< 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
1789
+ before(:all) do
1790
+ @at = attr(37)
1791
+ end
1792
+
1793
+ it 'upper range is 2000-01-01T00:00:00' do
1794
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
1795
+ end
1796
+
1797
+ it 'is not upper included' do
1798
+ @at.range.should_not be_upper_included
1799
+ end
1800
+
1801
+ it 'is lower unbounded' do
1802
+ @at.range.should be_lower_unbounded
1803
+ end
1804
+
1805
+ it 'assumed value is 2006-03-31T01:12:00' do
1806
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1807
+ end
1808
+ end
1809
+
1810
+ context '38th attribute |<= 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
1811
+ before(:all) do
1812
+ @at = attr(38)
1813
+ end
1814
+
1815
+ it 'upper range is 2000-01-01T00:00:00' do
1816
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
1817
+ end
1818
+
1819
+ it 'is upper included' do
1820
+ @at.range.should be_upper_included
1821
+ end
1822
+
1823
+ it 'is lower unbounded' do
1824
+ @at.range.should be_lower_unbounded
1825
+ end
1826
+
1827
+ it 'assumed value is 2006-03-31T01:12:00' do
1828
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1829
+ end
1830
+ end
1831
+
1832
+ context '39th attribute |> 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
1833
+ before(:all) do
1834
+ @at = attr(39)
1835
+ end
1836
+
1837
+ it 'lower range is 2000-01-01T00:00:00' do
1838
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1839
+ end
1840
+
1841
+ it 'is not lower included' do
1842
+ @at.range.should_not be_lower_included
1843
+ end
1844
+
1845
+ it 'is upper unbounded' do
1846
+ @at.range.should be_upper_unbounded
1847
+ end
1848
+
1849
+ it 'assumed value is 2006-03-31T01:12:00' do
1850
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1851
+ end
1852
+ end
1853
+
1854
+ context '40th attribute |>= 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
1855
+ before(:all) do
1856
+ @at = attr(40)
1857
+ end
1858
+
1859
+ it 'lower range is 2000-01-01T00:00:00' do
1860
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1861
+ end
1862
+
1863
+ it 'is lower included' do
1864
+ @at.range.should be_lower_included
1865
+ end
1866
+
1867
+ it 'is upper unbounded' do
1868
+ @at.range.should be_upper_unbounded
1869
+ end
1870
+
1871
+ it 'assumed value is 2006-03-31T01:12:00' do
1872
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
1873
+ end
1874
+ end
1875
+
1876
+ context '41st attribute yyyy-??-??T??:??:??' do
1877
+ before(:all) do
1878
+ @at = attr(41)
1879
+ end
1880
+
1881
+ it 'pattern is yyyy-??-??T??:??:??' do
1882
+ @at.pattern.should == 'yyyy-??-??T??:??:??'
1883
+ end
1884
+
1885
+ it 'does not have assumed_value' do
1886
+ @at.should_not have_assumed_value
1887
+ end
1888
+ end
1889
+
1890
+ context '42nd attribute |2000-01-01T00:00:00|' do
1891
+ before(:all) do
1892
+ @at = attr(42)
1893
+ end
1894
+
1895
+ it 'lower range is 12:35' do
1896
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1897
+ end
1898
+
1899
+ it 'upper range is 12:35' do
1900
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
1901
+ end
1902
+
1903
+ it 'is upper included' do
1904
+ @at.range.should be_upper_included
1905
+ end
1906
+
1907
+ it 'is lower included' do
1908
+ @at.range.should be_lower_included
1909
+ end
1910
+
1911
+ it 'is not upper unbounded' do
1912
+ @at.range.should_not be_upper_unbounded
1913
+ end
1914
+
1915
+ it 'is not lower unbounded' do
1916
+ @at.range.should_not be_lower_unbounded
1917
+ end
1918
+ end
1919
+
1920
+ context '43rd attribute 1995-03-17T12:01' do
1921
+ before(:all) do
1922
+ @at = attr(43)
1923
+ end
1924
+
1925
+ it '1st item of list is 1995-03-17T12:01' do
1926
+ @at.list[0].value.should == '1995-03-17T12:01'
1927
+ end
1928
+
1929
+ it 'hour is 12' do
1930
+ @at.list[0].hour.should be 12
1931
+ end
1932
+
1933
+ it 'minute is 1' do
1934
+ @at.list[0].minute.should be 1
1935
+ end
1936
+ end
1937
+
1938
+ context '44th attribute 1995-03-17T12' do
1939
+ before(:all) do
1940
+ @at = attr(43)
1941
+ end
1942
+
1943
+ it '1st item of list is 1995-03-17T12:01' do
1944
+ @at.list[0].value.should == '1995-03-17T12:01'
1945
+ end
1946
+
1947
+ it 'hour is 12' do
1948
+ @at.list[0].hour.should be 12
1949
+ end
1950
+ end
1951
+ end
1952
+ end
1953
+ end