openehr 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (384) hide show
  1. data/.document +5 -0
  2. data/.rspec +2 -0
  3. data/.travis.yml +3 -0
  4. data/Gemfile +23 -0
  5. data/Guardfile +12 -0
  6. data/History.txt +36 -0
  7. data/PostInstall.txt +9 -0
  8. data/README.rdoc +82 -0
  9. data/Rakefile +44 -0
  10. data/VERSION +1 -0
  11. data/doc/openehr_terminology.xml +2700 -0
  12. data/lib/openehr.rb +11 -0
  13. data/lib/openehr/am.rb +8 -0
  14. data/lib/openehr/am/archetype.rb +133 -0
  15. data/lib/openehr/am/archetype/assertion.rb +190 -0
  16. data/lib/openehr/am/archetype/constraint_model.rb +328 -0
  17. data/lib/openehr/am/archetype/constraint_model/primitive.rb +327 -0
  18. data/lib/openehr/am/archetype/ontology.rb +126 -0
  19. data/lib/openehr/am/openehr_profile.rb +9 -0
  20. data/lib/openehr/am/openehr_profile/data_types.rb +13 -0
  21. data/lib/openehr/am/openehr_profile/data_types/basic.rb +114 -0
  22. data/lib/openehr/am/openehr_profile/data_types/quantity.rb +67 -0
  23. data/lib/openehr/am/openehr_profile/data_types/text.rb +22 -0
  24. data/lib/openehr/assumed_library_types.rb +691 -0
  25. data/lib/openehr/parser.rb +23 -0
  26. data/lib/openehr/parser/adl.rb +57 -0
  27. data/lib/openehr/parser/adl_grammar.tt +245 -0
  28. data/lib/openehr/parser/adl_parser.rb +52 -0
  29. data/lib/openehr/parser/cadl_grammar.tt +1527 -0
  30. data/lib/openehr/parser/cadl_node.rb +44 -0
  31. data/lib/openehr/parser/dadl.rb +13 -0
  32. data/lib/openehr/parser/dadl_grammar.tt +358 -0
  33. data/lib/openehr/parser/exception.rb +68 -0
  34. data/lib/openehr/parser/shared_token_grammar.tt +1229 -0
  35. data/lib/openehr/parser/validator.rb +19 -0
  36. data/lib/openehr/parser/xml_perser.rb +13 -0
  37. data/lib/openehr/rm.rb +15 -0
  38. data/lib/openehr/rm/common.rb +14 -0
  39. data/lib/openehr/rm/common/archetyped.rb +182 -0
  40. data/lib/openehr/rm/common/change_control.rb +332 -0
  41. data/lib/openehr/rm/common/directory.rb +29 -0
  42. data/lib/openehr/rm/common/generic.rb +216 -0
  43. data/lib/openehr/rm/common/resource.rb +154 -0
  44. data/lib/openehr/rm/composition.rb +103 -0
  45. data/lib/openehr/rm/composition/content.rb +22 -0
  46. data/lib/openehr/rm/composition/content/entry.rb +253 -0
  47. data/lib/openehr/rm/composition/content/navigation.rb +31 -0
  48. data/lib/openehr/rm/data_structures.rb +25 -0
  49. data/lib/openehr/rm/data_structures/history.rb +117 -0
  50. data/lib/openehr/rm/data_structures/item_structure.rb +218 -0
  51. data/lib/openehr/rm/data_structures/item_structure/representation.rb +63 -0
  52. data/lib/openehr/rm/data_types.rb +14 -0
  53. data/lib/openehr/rm/data_types/basic.rb +108 -0
  54. data/lib/openehr/rm/data_types/charset.lst +818 -0
  55. data/lib/openehr/rm/data_types/charset_extract.rb +24 -0
  56. data/lib/openehr/rm/data_types/encapsulated.rb +98 -0
  57. data/lib/openehr/rm/data_types/quantity.rb +402 -0
  58. data/lib/openehr/rm/data_types/quantity/date_time.rb +256 -0
  59. data/lib/openehr/rm/data_types/text.rb +169 -0
  60. data/lib/openehr/rm/data_types/time_specification.rb +75 -0
  61. data/lib/openehr/rm/data_types/uri.rb +83 -0
  62. data/lib/openehr/rm/demographic.rb +269 -0
  63. data/lib/openehr/rm/ehr.rb +162 -0
  64. data/lib/openehr/rm/integration.rb +27 -0
  65. data/lib/openehr/rm/security.rb +12 -0
  66. data/lib/openehr/rm/support.rb +14 -0
  67. data/lib/openehr/rm/support/definition.rb +15 -0
  68. data/lib/openehr/rm/support/identification.rb +412 -0
  69. data/lib/openehr/rm/support/measurement.rb +17 -0
  70. data/lib/openehr/rm/support/terminology.rb +135 -0
  71. data/lib/openehr/serializer.rb +272 -0
  72. data/lib/openehr/terminology.rb +7 -0
  73. data/lib/openehr/terminology/open_ehr_terminology.rb +41 -0
  74. data/lib/openehr/writer.rb +12 -0
  75. data/openehr.gemspec +472 -0
  76. data/spec/lib/openehr/am/archetype/archetype_spec.rb +103 -0
  77. data/spec/lib/openehr/am/archetype/assertion/assertion_spec.rb +60 -0
  78. data/spec/lib/openehr/am/archetype/assertion/assertion_variable_spec.rb +30 -0
  79. data/spec/lib/openehr/am/archetype/assertion/expr_binary_operator.rb +40 -0
  80. data/spec/lib/openehr/am/archetype/assertion/expr_item_spec.rb +28 -0
  81. data/spec/lib/openehr/am/archetype/assertion/expr_leaf_spec.rb +34 -0
  82. data/spec/lib/openehr/am/archetype/assertion/expr_operator_spec.rb +25 -0
  83. data/spec/lib/openehr/am/archetype/assertion/expr_unary_operator_spec.rb +26 -0
  84. data/spec/lib/openehr/am/archetype/assertion/operator_kind_spec.rb +114 -0
  85. data/spec/lib/openehr/am/archetype/constraint_model/archetype_constraint_spec.rb +56 -0
  86. data/spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb +36 -0
  87. data/spec/lib/openehr/am/archetype/constraint_model/archetype_slot_spec.rb +61 -0
  88. data/spec/lib/openehr/am/archetype/constraint_model/c_attribute_spec.rb +59 -0
  89. data/spec/lib/openehr/am/archetype/constraint_model/c_complex_object_spec.rb +39 -0
  90. data/spec/lib/openehr/am/archetype/constraint_model/c_defined_object_spec.rb +53 -0
  91. data/spec/lib/openehr/am/archetype/constraint_model/c_domain_type_spec.rb +25 -0
  92. data/spec/lib/openehr/am/archetype/constraint_model/c_multiple_attribute_spec.rb +23 -0
  93. data/spec/lib/openehr/am/archetype/constraint_model/c_object_spec.rb +61 -0
  94. data/spec/lib/openehr/am/archetype/constraint_model/c_primitive_object_spec.rb +33 -0
  95. data/spec/lib/openehr/am/archetype/constraint_model/c_reference_object_spec.rb +17 -0
  96. data/spec/lib/openehr/am/archetype/constraint_model/c_single_attribute_spec.rb +22 -0
  97. data/spec/lib/openehr/am/archetype/constraint_model/cardinality_spec.rb +68 -0
  98. data/spec/lib/openehr/am/archetype/constraint_model/constraint_ref_spec.rb +29 -0
  99. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_boolean_spec.rb +57 -0
  100. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_date_spec.rb +52 -0
  101. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_date_time_spec.rb +136 -0
  102. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_duration_spec.rb +41 -0
  103. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_integer_spec.rb +67 -0
  104. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_primitive_spec.rb +41 -0
  105. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_real_spec.rb +19 -0
  106. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_string_spec.rb +73 -0
  107. data/spec/lib/openehr/am/archetype/constraint_model/primitive/c_time_spec.rb +104 -0
  108. data/spec/lib/openehr/am/archetype/ontology/archetype_ontology_spec.rb +97 -0
  109. data/spec/lib/openehr/am/archetype/ontology/archetype_term_spec.rb +43 -0
  110. data/spec/lib/openehr/am/archetype/validity_kind_spec.rb +42 -0
  111. data/spec/lib/openehr/am/openehr_profile/data_types/basic/c_dv_state_spec.rb +34 -0
  112. data/spec/lib/openehr/am/openehr_profile/data_types/basic/non_terminal_state_spec.rb +36 -0
  113. data/spec/lib/openehr/am/openehr_profile/data_types/basic/state_machine_spec.rb +34 -0
  114. data/spec/lib/openehr/am/openehr_profile/data_types/basic/state_spec.rb +26 -0
  115. data/spec/lib/openehr/am/openehr_profile/data_types/basic/terminal_state_spec.rb +18 -0
  116. data/spec/lib/openehr/am/openehr_profile/data_types/basic/transition_spec.rb +62 -0
  117. data/spec/lib/openehr/am/openehr_profile/data_types/quantity/c_dv_ordinal_spec.rb +41 -0
  118. data/spec/lib/openehr/am/openehr_profile/data_types/quantity/c_dv_quantity_spec.rb +50 -0
  119. data/spec/lib/openehr/am/openehr_profile/data_types/quantity/c_quantity_item_spec.rb +46 -0
  120. data/spec/lib/openehr/am/openehr_profile/data_types/text/c_code_phrase_spec.rb +34 -0
  121. data/spec/lib/openehr/assumed_library_types/interval_spec.rb +145 -0
  122. data/spec/lib/openehr/assumed_library_types/iso8601_date_spec.rb +236 -0
  123. data/spec/lib/openehr/assumed_library_types/iso8601_date_time_spec.rb +47 -0
  124. data/spec/lib/openehr/assumed_library_types/iso8601_duration_spec.rb +150 -0
  125. data/spec/lib/openehr/assumed_library_types/iso8601_time_spec.rb +234 -0
  126. data/spec/lib/openehr/assumed_library_types/iso8601_timezone_spec.rb +57 -0
  127. data/spec/lib/openehr/assumed_library_types/time_definitions_spec.rb +136 -0
  128. data/spec/lib/openehr/assumed_library_types/timezone_spec.rb +42 -0
  129. data/spec/lib/openehr/parser/adl14/adl-test-ENTRY.assumed_types.v1.adl +88 -0
  130. data/spec/lib/openehr/parser/adl14/adl-test-ENTRY.basic_types.v1.adl +143 -0
  131. data/spec/lib/openehr/parser/adl14/adl-test-ENTRY.basic_types_fail.v1.adl +50 -0
  132. data/spec/lib/openehr/parser/adl14/adl-test-ENTRY.most_minimal.v1.adl +27 -0
  133. data/spec/lib/openehr/parser/adl14/adl-test-ENTRY.structure_test1.v1.adl +46 -0
  134. data/spec/lib/openehr/parser/adl14/adl-test-SOME_TYPE.generic_type_basic.draft.adl +56 -0
  135. data/spec/lib/openehr/parser/adl14/adl-test-SOME_TYPE.generic_type_use_node.draft.adl +63 -0
  136. data/spec/lib/openehr/parser/adl14/adl-test-car.paths.test.adl +80 -0
  137. data/spec/lib/openehr/parser/adl14/adl-test-car.use_node.test.adl +87 -0
  138. data/spec/lib/openehr/parser/adl14/adl-test-composition.dv_coded_text.test.adl +29 -0
  139. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_bindings.test.adl +47 -0
  140. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_desc_missing_purpose.test.adl +45 -0
  141. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_description.test.adl +61 -0
  142. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_description2.test.adl +45 -0
  143. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_identification.test.adl +26 -0
  144. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_internal_ref.test.adl +36 -0
  145. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_internal_ref2.test.adl +36 -0
  146. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_language.test.adl +47 -0
  147. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_language_no_accreditation.test.adl +38 -0
  148. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_language_order_of_translation_details.test.adl +40 -0
  149. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_ontology.test.adl +25 -0
  150. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_slot.test.adl +40 -0
  151. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_slot.test2.adl +37 -0
  152. data/spec/lib/openehr/parser/adl14/adl-test-entry.archetype_uncommonkeys.test.adl +29 -0
  153. data/spec/lib/openehr/parser/adl14/adl-test-entry.basic_types.test.adl +272 -0
  154. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_code_phrase.test.adl +77 -0
  155. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_ordinal.test.adl +66 -0
  156. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_empty.test.adl +46 -0
  157. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_full.test.adl +64 -0
  158. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_full2.test.adl +64 -0
  159. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_full3.test.adl +64 -0
  160. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_item_units_only.test.adl +55 -0
  161. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_list.test.adl +58 -0
  162. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_property.test.adl +47 -0
  163. data/spec/lib/openehr/parser/adl14/adl-test-entry.c_dv_quantity_reversed.test.adl +59 -0
  164. data/spec/lib/openehr/parser/adl14/adl-test-entry.constraint_binding.test.adl +37 -0
  165. data/spec/lib/openehr/parser/adl14/adl-test-entry.constraint_ref.test.adl +43 -0
  166. data/spec/lib/openehr/parser/adl14/adl-test-entry.datetime.test.adl +183 -0
  167. data/spec/lib/openehr/parser/adl14/adl-test-entry.domain_types.test.adl +97 -0
  168. data/spec/lib/openehr/parser/adl14/adl-test-entry.durations.test.adl +109 -0
  169. data/spec/lib/openehr/parser/adl14/adl-test-entry.empty_other_contributors.test.adl +42 -0
  170. data/spec/lib/openehr/parser/adl14/adl-test-entry.missing_language.test.adl +23 -0
  171. data/spec/lib/openehr/parser/adl14/adl-test-entry.mixed_node_types.draft.adl +61 -0
  172. data/spec/lib/openehr/parser/adl14/adl-test-entry.most_minimal.test.adl +23 -0
  173. data/spec/lib/openehr/parser/adl14/adl-test-entry.multi_language.test.adl +52 -0
  174. data/spec/lib/openehr/parser/adl14/adl-test-entry.special_string.test.adl +88 -0
  175. data/spec/lib/openehr/parser/adl14/adl-test-entry.structure_test1.test.adl +45 -0
  176. data/spec/lib/openehr/parser/adl14/adl-test-entry.structure_test2.test.adl +45 -0
  177. data/spec/lib/openehr/parser/adl14/adl-test-entry.term_binding.test.adl +37 -0
  178. data/spec/lib/openehr/parser/adl14/adl-test-entry.term_binding2.test.adl +32 -0
  179. data/spec/lib/openehr/parser/adl14/adl-test-entry.testtranslations.test.adl +83 -0
  180. data/spec/lib/openehr/parser/adl14/adl-test-entry.translations_author_language.test.adl +34 -0
  181. data/spec/lib/openehr/parser/adl14/adl-test-entry.translations_language_author.test.adl +34 -0
  182. data/spec/lib/openehr/parser/adl14/adl-test-entry.unicode_BOM_support.test.adl +41 -0
  183. data/spec/lib/openehr/parser/adl14/adl-test-entry.unicode_support.test.adl +41 -0
  184. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ACTION.imaging.v1.adl +275 -0
  185. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ACTION.referral.v1.adl +351 -0
  186. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl +765 -0
  187. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.auscultation.v1.adl +48 -0
  188. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl +134 -0
  189. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.dimensions.v1.adl +241 -0
  190. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl +321 -0
  191. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-chest.v1.adl +379 -0
  192. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-fetus.v1.adl +577 -0
  193. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl +146 -0
  194. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl +176 -0
  195. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl +221 -0
  196. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-generic.v1.adl +139 -0
  197. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl +116 -0
  198. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl +420 -0
  199. data/spec/lib/openehr/parser/adl14/openEHR-EHR-CLUSTER.exam-uterus.v1.adl +293 -0
  200. data/spec/lib/openehr/parser/adl14/openEHR-EHR-COMPOSITION.discharge.v1draft.adl +53 -0
  201. data/spec/lib/openehr/parser/adl14/openEHR-EHR-COMPOSITION.encounter.v1draft.adl +45 -0
  202. data/spec/lib/openehr/parser/adl14/openEHR-EHR-EVALUATION.adverse.v1.adl +411 -0
  203. data/spec/lib/openehr/parser/adl14/openEHR-EHR-EVALUATION.columna_vertebral.v1.adl +85 -0
  204. data/spec/lib/openehr/parser/adl14/openEHR-EHR-INSTRUCTION.medication.v1.adl +88 -0
  205. data/spec/lib/openehr/parser/adl14/openEHR-EHR-INSTRUCTION.referral.v1.adl +84 -0
  206. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl +492 -0
  207. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ITEM_TREE.follow_up.v1draft.adl +94 -0
  208. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ITEM_TREE.imaging.v1.adl +127 -0
  209. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ITEM_TREE.medication-formulation.v1.adl +457 -0
  210. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ITEM_TREE.medication.v1.adl +869 -0
  211. data/spec/lib/openehr/parser/adl14/openEHR-EHR-ITEM_TREE.referral.v1.adl +494 -0
  212. data/spec/lib/openehr/parser/adl14/openEHR-EHR-OBSERVATION.apgar.v1.adl +545 -0
  213. data/spec/lib/openehr/parser/adl14/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl +673 -0
  214. data/spec/lib/openehr/parser/adl14/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl +166 -0
  215. data/spec/lib/openehr/parser/adl14/openEHR-EHR-OBSERVATION.lab_test.v1.adl +376 -0
  216. data/spec/lib/openehr/parser/adl14/openEHR-EHR-OBSERVATION.testassumedvalue.v1.adl +99 -0
  217. data/spec/lib/openehr/parser/adl14/openEHR-EHR-SECTION.findings.v1.adl +47 -0
  218. data/spec/lib/openehr/parser/adl14/openEHR-EHR-SECTION.reason_for_encounter.v1.adl +51 -0
  219. data/spec/lib/openehr/parser/adl14/openEHR-EHR-SECTION.summary.v1.adl +52 -0
  220. data/spec/lib/openehr/parser/adl14/openEHR-EHR-SECTION.vital_signs.v1.adl +54 -0
  221. data/spec/lib/openehr/parser/adl_archetype_internal_ref2_spec.rb +42 -0
  222. data/spec/lib/openehr/parser/adl_archetype_internal_ref_spec.rb +125 -0
  223. data/spec/lib/openehr/parser/adl_archetype_internal_ref_with_generics_spec.rb +258 -0
  224. data/spec/lib/openehr/parser/adl_archetype_ontology_binding_spec.rb +98 -0
  225. data/spec/lib/openehr/parser/adl_archetype_ontology_spec.rb +42 -0
  226. data/spec/lib/openehr/parser/adl_archetype_slot_cluster_spec.rb +101 -0
  227. data/spec/lib/openehr/parser/adl_archetype_slot_spec.rb +193 -0
  228. data/spec/lib/openehr/parser/adl_archetype_uncommon_term_keys_spec.rb +25 -0
  229. data/spec/lib/openehr/parser/adl_description_spec.rb +164 -0
  230. data/spec/lib/openehr/parser/adl_identification_spec.rb +18 -0
  231. data/spec/lib/openehr/parser/adl_language_no_accreditation_spec.rb +66 -0
  232. data/spec/lib/openehr/parser/adl_language_order_spec.rb +68 -0
  233. data/spec/lib/openehr/parser/adl_language_spec.rb +119 -0
  234. data/spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb +50 -0
  235. data/spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb +46 -0
  236. data/spec/lib/openehr/parser/adl_parser_spec.rb +347 -0
  237. data/spec/lib/openehr/parser/adl_path_spec.rb +176 -0
  238. data/spec/lib/openehr/parser/base_spec.rb +19 -0
  239. data/spec/lib/openehr/parser/basic_generic_type_spec.rb +18 -0
  240. data/spec/lib/openehr/parser/basic_type_spec.rb +2922 -0
  241. data/spec/lib/openehr/parser/c_dv_quantity_any_allowed_spec.rb +34 -0
  242. data/spec/lib/openehr/parser/c_dv_quantity_shared_example_for_lacked_items_spec.rb +36 -0
  243. data/spec/lib/openehr/parser/c_dv_quantity_shared_example_spec.rb +146 -0
  244. data/spec/lib/openehr/parser/cdv_ordinal_parse_spec.rb +231 -0
  245. data/spec/lib/openehr/parser/code_phrase_spec.rb +96 -0
  246. data/spec/lib/openehr/parser/constraint_binding_spec.rb +26 -0
  247. data/spec/lib/openehr/parser/constraint_ref_spec.rb +32 -0
  248. data/spec/lib/openehr/parser/date_time_spec.rb +1953 -0
  249. data/spec/lib/openehr/parser/duration_spec.rb +475 -0
  250. data/spec/lib/openehr/parser/dv_coded_text_parse_spec.rb +27 -0
  251. data/spec/lib/openehr/parser/empty_other_contributors_spec.rb +19 -0
  252. data/spec/lib/openehr/parser/lab_test_parser_spec.rb +14 -0
  253. data/spec/lib/openehr/parser/missing_language_spec.rb +20 -0
  254. data/spec/lib/openehr/parser/missing_purpose_spec.rb +23 -0
  255. data/spec/lib/openehr/parser/mixed_node_types_spec.rb +16 -0
  256. data/spec/lib/openehr/parser/most_minimal_adl_spec.rb +19 -0
  257. data/spec/lib/openehr/parser/multi_language_spec.rb +58 -0
  258. data/spec/lib/openehr/parser/parser_spec_helper.rb +7 -0
  259. data/spec/lib/openehr/parser/path_based_terminology_binding_spec.rb +30 -0
  260. data/spec/lib/openehr/parser/special_string_spec.rb +20 -0
  261. data/spec/lib/openehr/parser/structure_comment_spec.rb +21 -0
  262. data/spec/lib/openehr/parser/structure_nested_comments_spec.rb +22 -0
  263. data/spec/lib/openehr/parser/structure_spec.rb +202 -0
  264. data/spec/lib/openehr/parser/term_binding_spec.rb +54 -0
  265. data/spec/lib/openehr/parser/unicode_bom_spec.rb +17 -0
  266. data/spec/lib/openehr/parser/unicode_support_spec.rb +46 -0
  267. data/spec/lib/openehr/rm/common/archetyped/archetyped_spec.rb +50 -0
  268. data/spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb +60 -0
  269. data/spec/lib/openehr/rm/common/archetyped/feeder_audit_spec.rb +51 -0
  270. data/spec/lib/openehr/rm/common/archetyped/link_spec.rb +42 -0
  271. data/spec/lib/openehr/rm/common/archetyped/locatable_spec.rb +89 -0
  272. data/spec/lib/openehr/rm/common/archetyped/pathable_spec.rb +42 -0
  273. data/spec/lib/openehr/rm/common/change_control/contribution_spec.rb +56 -0
  274. data/spec/lib/openehr/rm/common/change_control/imported_version_spec.rb +62 -0
  275. data/spec/lib/openehr/rm/common/change_control/original_version_spec.rb +71 -0
  276. data/spec/lib/openehr/rm/common/change_control/version_spec.rb +91 -0
  277. data/spec/lib/openehr/rm/common/change_control/versioned_object_spec.rb +284 -0
  278. data/spec/lib/openehr/rm/common/directory/folder_spec.rb +26 -0
  279. data/spec/lib/openehr/rm/common/generic/attestation_spec.rb +62 -0
  280. data/spec/lib/openehr/rm/common/generic/audit_details_spec.rb +51 -0
  281. data/spec/lib/openehr/rm/common/generic/participation_spec.rb +36 -0
  282. data/spec/lib/openehr/rm/common/generic/party_identified_spec.rb +64 -0
  283. data/spec/lib/openehr/rm/common/generic/party_proxy_spec.rb +18 -0
  284. data/spec/lib/openehr/rm/common/generic/party_related_spec.rb +24 -0
  285. data/spec/lib/openehr/rm/common/generic/revision_history_item_spec.rb +43 -0
  286. data/spec/lib/openehr/rm/common/generic/revision_history_spec.rb +45 -0
  287. data/spec/lib/openehr/rm/common/resource/authored_resource_spec.rb +68 -0
  288. data/spec/lib/openehr/rm/common/resource/resource_description_item_spec.rb +105 -0
  289. data/spec/lib/openehr/rm/common/resource/resource_description_spec.rb +74 -0
  290. data/spec/lib/openehr/rm/common/resource/translation_details_spec.rb +35 -0
  291. data/spec/lib/openehr/rm/composition/composition_spec.rb +92 -0
  292. data/spec/lib/openehr/rm/composition/content/content_item_spec.rb +14 -0
  293. data/spec/lib/openehr/rm/composition/content/entry/action_spec.rb +69 -0
  294. data/spec/lib/openehr/rm/composition/content/entry/activity_spec.rb +61 -0
  295. data/spec/lib/openehr/rm/composition/content/entry/admin_entry_spec.rb +38 -0
  296. data/spec/lib/openehr/rm/composition/content/entry/care_entry_spec.rb +37 -0
  297. data/spec/lib/openehr/rm/composition/content/entry/entry_spec.rb +98 -0
  298. data/spec/lib/openehr/rm/composition/content/entry/evaluation_spec.rb +37 -0
  299. data/spec/lib/openehr/rm/composition/content/entry/instruction_details_spec.rb +51 -0
  300. data/spec/lib/openehr/rm/composition/content/entry/instruction_spec.rb +62 -0
  301. data/spec/lib/openehr/rm/composition/content/entry/ism_transition_spec.rb +46 -0
  302. data/spec/lib/openehr/rm/composition/content/entry/observation_spec.rb +45 -0
  303. data/spec/lib/openehr/rm/composition/content/navigation/section_spec.rb +32 -0
  304. data/spec/lib/openehr/rm/composition/event_context_spec.rb +88 -0
  305. data/spec/lib/openehr/rm/data_structures/data_structure_spec.rb +21 -0
  306. data/spec/lib/openehr/rm/data_structures/history/event_spec.rb +44 -0
  307. data/spec/lib/openehr/rm/data_structures/history/history_spec.rb +67 -0
  308. data/spec/lib/openehr/rm/data_structures/history/interval_event_spec.rb +43 -0
  309. data/spec/lib/openehr/rm/data_structures/item_structure/item_list_spec.rb +53 -0
  310. data/spec/lib/openehr/rm/data_structures/item_structure/item_single_spec.rb +29 -0
  311. data/spec/lib/openehr/rm/data_structures/item_structure/item_table_spec.rb +147 -0
  312. data/spec/lib/openehr/rm/data_structures/item_structure/item_tree_spec.rb +48 -0
  313. data/spec/lib/openehr/rm/data_structures/item_structure/representation/cluster_spec.rb +26 -0
  314. data/spec/lib/openehr/rm/data_structures/item_structure/representation/element_spec.rb +22 -0
  315. data/spec/lib/openehr/rm/data_types/basic/data_value_spec.rb +17 -0
  316. data/spec/lib/openehr/rm/data_types/basic/dv_boolean_spec.rb +29 -0
  317. data/spec/lib/openehr/rm/data_types/basic/dv_identifier_spec.rb +108 -0
  318. data/spec/lib/openehr/rm/data_types/basic/dv_state_spec.rb +44 -0
  319. data/spec/lib/openehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb +42 -0
  320. data/spec/lib/openehr/rm/data_types/encapsulated/dv_multimedia_spec.rb +79 -0
  321. data/spec/lib/openehr/rm/data_types/encapsulated/dv_parsable_spec.rb +34 -0
  322. data/spec/lib/openehr/rm/data_types/quantity/date_time/dv_date_spec.rb +64 -0
  323. data/spec/lib/openehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb +26 -0
  324. data/spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb +44 -0
  325. data/spec/lib/openehr/rm/data_types/quantity/date_time/dv_temporal_spec.rb +25 -0
  326. data/spec/lib/openehr/rm/data_types/quantity/date_time/dv_time_spec.rb +41 -0
  327. data/spec/lib/openehr/rm/data_types/quantity/dv_absolute_quantity_spec.rb +35 -0
  328. data/spec/lib/openehr/rm/data_types/quantity/dv_amount_spec.rb +105 -0
  329. data/spec/lib/openehr/rm/data_types/quantity/dv_count_spec.rb +12 -0
  330. data/spec/lib/openehr/rm/data_types/quantity/dv_interval_spec.rb +17 -0
  331. data/spec/lib/openehr/rm/data_types/quantity/dv_ordered_spec.rb +60 -0
  332. data/spec/lib/openehr/rm/data_types/quantity/dv_ordinal_spec.rb +74 -0
  333. data/spec/lib/openehr/rm/data_types/quantity/dv_proportion_spec.rb +162 -0
  334. data/spec/lib/openehr/rm/data_types/quantity/dv_quantified_spec.rb +36 -0
  335. data/spec/lib/openehr/rm/data_types/quantity/dv_quantity_spec.rb +78 -0
  336. data/spec/lib/openehr/rm/data_types/quantity/proportion_kind_spec.rb +24 -0
  337. data/spec/lib/openehr/rm/data_types/quantity/reference_range_spec.rb +43 -0
  338. data/spec/lib/openehr/rm/data_types/text/code_phrase_spec.rb +23 -0
  339. data/spec/lib/openehr/rm/data_types/text/dv_paragraph_spec.rb +13 -0
  340. data/spec/lib/openehr/rm/data_types/text/dv_text_spec.rb +79 -0
  341. data/spec/lib/openehr/rm/data_types/text/term_mapping_spec.rb +59 -0
  342. data/spec/lib/openehr/rm/data_types/uri/dv_ehr_uri_spec.rb +21 -0
  343. data/spec/lib/openehr/rm/data_types/uri/dv_uri_spec.rb +36 -0
  344. data/spec/lib/openehr/rm/demographic/actor_spec.rb +79 -0
  345. data/spec/lib/openehr/rm/demographic/address_spec.rb +33 -0
  346. data/spec/lib/openehr/rm/demographic/capability_spec.rb +37 -0
  347. data/spec/lib/openehr/rm/demographic/contact_spec.rb +45 -0
  348. data/spec/lib/openehr/rm/demographic/party_identity_spec.rb +32 -0
  349. data/spec/lib/openehr/rm/demographic/party_relationship_spec.rb +84 -0
  350. data/spec/lib/openehr/rm/demographic/party_spec.rb +131 -0
  351. data/spec/lib/openehr/rm/demographic/role_spec.rb +58 -0
  352. data/spec/lib/openehr/rm/ehr/ehr_access_spec.rb +33 -0
  353. data/spec/lib/openehr/rm/ehr/ehr_spec.rb +139 -0
  354. data/spec/lib/openehr/rm/ehr/ehr_status_spec.rb +52 -0
  355. data/spec/lib/openehr/rm/ehr/versioned_composition_spec.rb +33 -0
  356. data/spec/lib/openehr/rm/integration/generic_entry_spec.rb +31 -0
  357. data/spec/lib/openehr/rm/support/identification/access_group_ref_spec.rb +19 -0
  358. data/spec/lib/openehr/rm/support/identification/archetype_id_spec.rb +152 -0
  359. data/spec/lib/openehr/rm/support/identification/generic_id_spec.rb +33 -0
  360. data/spec/lib/openehr/rm/support/identification/hier_object_id_spec.rb +12 -0
  361. data/spec/lib/openehr/rm/support/identification/internet_id_spec.rb +12 -0
  362. data/spec/lib/openehr/rm/support/identification/iso_oid_spec.rb +12 -0
  363. data/spec/lib/openehr/rm/support/identification/locatable_ref_spec.rb +34 -0
  364. data/spec/lib/openehr/rm/support/identification/object_id_spec.rb +24 -0
  365. data/spec/lib/openehr/rm/support/identification/object_ref_spec.rb +33 -0
  366. data/spec/lib/openehr/rm/support/identification/object_version_id_spec.rb +59 -0
  367. data/spec/lib/openehr/rm/support/identification/party_ref_spec.rb +29 -0
  368. data/spec/lib/openehr/rm/support/identification/template_id_spec.rb +12 -0
  369. data/spec/lib/openehr/rm/support/identification/terminology_id_spec.rb +33 -0
  370. data/spec/lib/openehr/rm/support/identification/uid_based_id_spec.rb +50 -0
  371. data/spec/lib/openehr/rm/support/identification/uid_spec.rb +29 -0
  372. data/spec/lib/openehr/rm/support/identification/version_tree_id_spec.rb +104 -0
  373. data/spec/lib/openehr/rm/support/measurement_service_spec.rb +7 -0
  374. data/spec/lib/openehr/rm/support/terminology_service_spec.rb +24 -0
  375. data/spec/lib/openehr/serializer/adl-test-entry.most_minimal.test.adl +20 -0
  376. data/spec/lib/openehr/serializer/adl_serializer_spec.rb +47 -0
  377. data/spec/lib/openehr/serializer/openEHR-EHR-SECTION.test.v1.adl +38 -0
  378. data/spec/lib/openehr/serializer/openEHR-EHR-SECTION.test.v1.xml +58 -0
  379. data/spec/lib/openehr/serializer/sample_archetype_spec.rb +44 -0
  380. data/spec/lib/openehr/serializer/xml_serializer_spec.rb +49 -0
  381. data/spec/lib/openehr/terminology/open_ehr_terminology_spec.rb +40 -0
  382. data/spec/spec.opts +6 -0
  383. data/spec/spec_helper.rb +58 -0
  384. metadata +631 -0
@@ -0,0 +1,96 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require File.dirname(__FILE__) + '/parser_spec_helper'
3
+ require 'openehr/am/openehr_profile/data_types/text'
4
+ include ::OpenEHR::AM::OpenEHRProfile::DataTypes::Text
5
+ # ticket 171
6
+
7
+ describe ADLParser do
8
+ context 'CCodePhase type' do
9
+ before(:all) do
10
+ archetype = adl14_archetype('adl-test-entry.c_code_phrase.test.adl')
11
+ @attributes = archetype.definition.attributes
12
+ end
13
+
14
+ def attr(index)
15
+ @attributes[0].children[0].attributes[0].children[index-1].attributes[0].children[0]
16
+ end
17
+
18
+ context '1st constraint is icd10::F43.00,F43.01,F32.02' do
19
+ before(:all) do
20
+ @at = attr(1)
21
+ end
22
+
23
+ it 'at is an instance of CCodePhrase' do
24
+ @at.should be_an_instance_of CCodePhrase
25
+ end
26
+
27
+ it 'terminology id is icd10' do
28
+ @at.terminology_id.value.should == 'icd10'
29
+ end
30
+
31
+ it 'code_list is F43.00,F43.01,F32.02' do
32
+ @at.code_list.should == ['F43.00','F43.01','F32.02']
33
+ end
34
+ end
35
+
36
+ context '2nd constraint is local::at1311,at1312,at1313,at1314,at1315' do
37
+ before(:all) do
38
+ @at = attr(2)
39
+ end
40
+
41
+ it 'terminology id is local' do
42
+ @at.terminology_id.value.should == 'local'
43
+ end
44
+
45
+ it 'code_list is at1311,at1312,at1313,at1314,at1315' do
46
+ @at.code_list.should == ['at1311','at1312','at1313','at1314','at1315']
47
+ end
48
+ end
49
+
50
+ context '3rd constraint is icd10::' do
51
+ before(:all) do
52
+ @at = attr(3)
53
+ end
54
+
55
+ it 'terminology id is icd10' do
56
+ @at.terminology_id.value.should == 'icd10'
57
+ end
58
+
59
+ it 'code_list is empty' do
60
+ @at.code_list.should == []
61
+ end
62
+ end
63
+
64
+ context '4th constraint is icd10::F43.00,F43.01,F32.02;F43.00' do
65
+ before(:all) do
66
+ @at = attr(4)
67
+ end
68
+
69
+ it 'terminology id is icd10' do
70
+ @at.terminology_id.value.should == 'icd10'
71
+ end
72
+
73
+ it 'code_list is F43.00,F43.01,F32.02' do
74
+ @at.code_list.should == ['F43.00','F43.01','F32.02']
75
+ end
76
+
77
+ it 'assumed value is F43.00' do
78
+ @at.assumed_value.should == 'F43.00'
79
+ end
80
+ end
81
+
82
+ context '5th constraint is openehr::431' do
83
+ before(:all) do
84
+ @at = attr(5)
85
+ end
86
+
87
+ it 'terminology is openehr' do
88
+ @at.terminology_id.value.should == 'openehr'
89
+ end
90
+
91
+ it 'code_list is 431' do
92
+ @at.code_list.should == ['431']
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,26 @@
1
+ # ticket #175
2
+ require File.dirname(__FILE__) + '/../../../spec_helper'
3
+ require File.dirname(__FILE__) + '/parser_spec_helper'
4
+
5
+ describe ADLParser do
6
+ context 'Constraint Bindings' do
7
+ before(:all) do
8
+ at = adl14_archetype('adl-test-entry.constraint_binding.test.adl')
9
+ @ao = at.ontology
10
+ end
11
+
12
+ it 'contraint bindings size is two' do
13
+ @ao.constraint_bindings.size.should be 2
14
+ end
15
+
16
+ it 'SNOMED_CT binds local ac0001 to http://terminology.org/?terminology_id=snomed_ct&&has_relation=102002;with_target=128004' do
17
+ @ao.constraint_binding(:terminology => 'SNOMED_CT', :code => 'ac0001').
18
+ value.should == 'http://terminology.org?terminology_id=snomed_ct&&has_relation=102002;with_target=128004'
19
+ end
20
+
21
+ it 'ICD10 binds local ac0001 to http://terminology.org/?terminology_id=icd10&&has_relation=a2;with_target=b19' do
22
+ @ao.constraint_binding(:terminology => 'ICD10', :code => 'ac0001').
23
+ value.should == 'http://terminology.org?terminology_id=icd10&&has_relation=a2;with_target=b19'
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,32 @@
1
+ # ticket #176
2
+ require File.dirname(__FILE__) + '/../../../spec_helper'
3
+ require File.dirname(__FILE__) + '/parser_spec_helper'
4
+
5
+ describe ADLParser do
6
+ context 'Constraint Refs' do
7
+ before(:all) do
8
+ @archetype = adl14_archetype('adl-test-entry.constraint_ref.test.adl')
9
+ end
10
+
11
+ it 'archetype is an instance of OpenEHR::AM::Archetype::Archetype' do
12
+ @archetype.should be_an_instance_of OpenEHR::AM::Archetype::Archetype
13
+ end
14
+ context 'constraint ref node' do
15
+ before(:all) do
16
+ @cr = @archetype.definition.attributes[0].children[0].attributes[0].
17
+ children[0].attributes[0].children[0].attributes[0].children[0]
18
+ end
19
+ it 'is an instance of ConstrantRef' do
20
+ @cr.should be_an_instance_of OpenEHR::AM::Archetype::ConstraintModel::ConstraintRef
21
+ end
22
+
23
+ it 'path is /content[at0001]/items[at0002]/value/defining_code' do
24
+ @cr.path.should == '/content[at0001]/items[at0002]/value/defining_code'
25
+ end
26
+
27
+ it 'reference is ac0001' do
28
+ @cr.reference.should == 'ac0001'
29
+ end
30
+ end
31
+ end
32
+ end
@@ -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