openehr 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,176 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ include OpenEHR::Parser
3
+
4
+
5
+ describe ADLParser do
6
+ before(:all) do
7
+ adl_dir = File.dirname(__FILE__) + '/adl14/'
8
+ adl_path_test_file = 'adl-test-car.paths.test.adl'
9
+ ap = ADLParser.new(adl_dir + adl_path_test_file)
10
+ @root = ap.parse.definition
11
+ end
12
+
13
+ it 'root path is /' do
14
+ @root.path.should == '/'
15
+ end
16
+
17
+ context 'wheels' do
18
+ before(:all) do
19
+ @wheels = @root.attributes[0]
20
+ end
21
+
22
+ it 'wheels path is /wheels' do
23
+ @wheels.path.should == '/wheels'
24
+ end
25
+
26
+ context 'first wheel' do
27
+ before(:all) do
28
+ @first_wheel = @wheels.children[0]
29
+ end
30
+
31
+ it 'path is /wheels[at0001]' do
32
+ @first_wheel.path.should == '/wheels[at0001]'
33
+ end
34
+
35
+ it 'description path is /wheels[at0001]/description' do
36
+ description = @first_wheel.attributes[0]
37
+ description.path.should == '/wheels[at0001]/description'
38
+ end
39
+
40
+ it 'wheel parts path is /wheels[at0001]/parts' do
41
+ wheel_parts = @first_wheel.attributes[1]
42
+ wheel_parts.path.should == '/wheels[at0001]/parts'
43
+ end
44
+
45
+ context 'parts node' do
46
+ before(:all) do
47
+ @parts_node = @first_wheel.attributes[1].children[0]
48
+ end
49
+
50
+ it 'parts node path is /wheels[at0001]/parts[at0002]' do
51
+ @parts_node.path.should == '/wheels[at0001]/parts[at0002]'
52
+ end
53
+
54
+ context 'somthing of wheel part' do
55
+ before(:all) do
56
+ @something = @parts_node.attributes[0]
57
+ end
58
+
59
+ it 'something of WHEEL_PART path is /wheels[at0001]/parts[at0002]/something' do
60
+ @something.path.should == '/wheels[at0001]/parts[at0002]/something'
61
+ end
62
+ end
63
+
64
+ context 'somthing else of wheel part' do
65
+ before(:all) do
66
+ @something_else = @parts_node.attributes[1]
67
+ end
68
+
69
+ it 'something else of WHEEL_PART path is /wheels[at0001]/parts[at0002]/something_else' do
70
+ @something_else.path.should ==
71
+ '/wheels[at0001]/parts[at0002]/something_else'
72
+ end
73
+ end
74
+ end
75
+ end
76
+
77
+ context 'second wheel' do
78
+ before(:all) do
79
+ @second_wheel = @wheels.children[1]
80
+ end
81
+
82
+ it 'path is /wheels[at0003]' do
83
+ @second_wheel.path.should == '/wheels[at0003]'
84
+ end
85
+
86
+ it 'description path is /wheels[at0003]/description' do
87
+ description = @second_wheel.attributes[0]
88
+ description.path.should == '/wheels[at0003]/description'
89
+ end
90
+
91
+ it 'wheel parts path is /wheels[at0003]/parts' do
92
+ wheel_parts = @second_wheel.attributes[1]
93
+ wheel_parts.path.should == '/wheels[at0003]/parts'
94
+ end
95
+
96
+ context 'parts node' do
97
+ before(:all) do
98
+ @parts_node = @second_wheel.attributes[1].children[0]
99
+ end
100
+
101
+ it 'wheel parts node path is /wheels[at0003]/parts' do
102
+ @parts_node.path.should == '/wheels[at0003]/parts'
103
+ end
104
+
105
+ it 'wheel parts node target path is /wheels[at0001]/parts[at0002]' do
106
+ @parts_node.target_path.should == '/wheels[at0001]/parts[at0002]'
107
+ end
108
+ end
109
+ end
110
+
111
+ context 'third wheel' do
112
+ before(:all) do
113
+ @third_wheel = @wheels.children[2]
114
+ end
115
+
116
+ it 'path is /wheels[at0004]' do
117
+ @third_wheel.path.should == '/wheels[at0004]'
118
+ end
119
+
120
+ it 'description path is /wheels[at0004]/description' do
121
+ description = @third_wheel.attributes[0]
122
+ description.path.should == '/wheels[at0004]/description'
123
+ end
124
+
125
+ context 'parts node' do
126
+ before(:all) do
127
+ @parts_node = @third_wheel.attributes[1].children[0]
128
+ end
129
+
130
+ it 'parts node path is /wheels[at0004]/parts' do
131
+ @parts_node.path.should == '/wheels[at0004]/parts'
132
+ end
133
+
134
+ it 'parts node target path is /wheels[at0001]/parts[at0002]' do
135
+ @parts_node.target_path.should == '/wheels[at0001]/parts[at0002]'
136
+ end
137
+ end
138
+ end
139
+
140
+ context 'fourth wheel' do
141
+ before(:all) do
142
+ @fourth_wheel = @wheels.children[3]
143
+ end
144
+
145
+ it 'path is /wheels[at0005]' do
146
+ @fourth_wheel.path.should == '/wheels[at0005]'
147
+ end
148
+
149
+ it 'description path is /wheels[at0005]/description' do
150
+ description = @fourth_wheel.attributes[0]
151
+ description.path.should == '/wheels[at0005]/description'
152
+ end
153
+
154
+ context 'parts node' do
155
+ before(:all) do
156
+ @parts_node = @fourth_wheel.attributes[1].children[0]
157
+ end
158
+
159
+ it 'parts node path is /wheels[at0005]/parts' do
160
+ @parts_node.path.should == '/wheels[at0005]/parts'
161
+ end
162
+
163
+ it 'parts node target path is /engine[at0001]/parts[at0002]' do
164
+ @parts_node.target_path.should == '/engine[at0001]/parts[at0002]'
165
+ end
166
+ end
167
+ end
168
+
169
+ context 'fifhth wheel' do
170
+ it 'fifth wheel is nil' do
171
+ fifth_wheel = @wheels.children[4]
172
+ fifth_wheel.should be_nil
173
+ end
174
+ end
175
+ end
176
+ end
@@ -0,0 +1,19 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ include OpenEHR::Parser
3
+
4
+ describe Base do
5
+ context 'create an instance' do
6
+ before do
7
+ adl_dir = File.dirname(__FILE__)+'/adl/'
8
+ @bp = Base.new(adl_dir + 'openEHR-EHR-SECTION.summary.v1.adl')
9
+ end
10
+
11
+ it 'creates an instance' do
12
+ @bp.should be_an_instance_of Base
13
+ end
14
+
15
+ it 'returns filename' do
16
+ @bp.filename.should match /openEHR-EHR-SECTION.summary.v1.adl$/
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require File.dirname(__FILE__) + '/parser_spec_helper'
3
+ include OpenEHR::AM::Archetype
4
+
5
+ # ticket 169
6
+ # almost same as adl_archetype_internal_ref_with_generics_spec.rb
7
+
8
+ describe ADLParser do
9
+ context 'Basic Generic type' do
10
+ before(:all) do
11
+ @archetype = adl14_archetype('adl-test-SOME_TYPE.generic_type_basic.draft.adl')
12
+ end
13
+
14
+ it 'is an instance of Archetype' do
15
+ @archetype.should be_an_instance_of Archetype
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,2922 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require File.dirname(__FILE__) + '/parser_spec_helper'
3
+ include OpenEHR::AM::Archetype
4
+
5
+ # ticket 170
6
+
7
+ describe ADLParser do
8
+ context 'Basic Generic type' do
9
+ def attr(index)
10
+ return @constraints[index-1].children[0]
11
+ end
12
+
13
+ def const(index)
14
+ return @attributes[index].children[0].attributes
15
+ end
16
+
17
+ before(:all) do
18
+ archetype = adl14_archetype('adl-test-entry.basic_types.test.adl')
19
+ @attributes = archetype.definition.attributes
20
+ end
21
+
22
+
23
+ context 'String constraint' do
24
+ before(:all) do
25
+ @constraints = const(0)
26
+ end
27
+
28
+ it 'first attribute list is something' do
29
+ attr(1).list.should == ['something']
30
+ end
31
+
32
+ it 'second attribute pattern is /this|that|something else/' do
33
+ attr(2).pattern.should ==
34
+ '/this|that|something else/'
35
+ end
36
+
37
+ it 'third attribute pattern is /cardio.*/' do
38
+ attr(3).pattern.should == '/cardio.*/'
39
+ end
40
+
41
+ it 'fourth attribute pattern is ^mg|mg/ml|mg/g^' do
42
+ attr(4).pattern.should == '^mg|mg/ml|mg/g^'
43
+ end
44
+
45
+ it 'fifth attribute list is apple, pear' do
46
+ attr(5).list.should == ["apple","pear"]
47
+ end
48
+
49
+ it 'sixth attribute list is something' do
50
+ attr(6).list.should == ['something']
51
+ end
52
+
53
+ it 'sixth attribute assumed nothing' do
54
+ attr(6).assumed_value.should == 'nothing'
55
+ end
56
+
57
+ it 'seventh attribute pattern is /this|that|something else/' do
58
+ attr(7).pattern.should == '/this|that|something else/'
59
+ end
60
+
61
+ it 'seventh attribute assumed value is those' do
62
+ attr(7).assumed_value.should == 'those'
63
+ end
64
+
65
+ it 'eighth attribute pattern is /cardio.*/' do
66
+ attr(8).pattern.should == '/cardio.*/'
67
+ end
68
+
69
+ it 'eighth attribute assumed value is cardio.txt' do
70
+ attr(8).assumed_value.should == 'cardio.txt'
71
+ end
72
+
73
+ it 'ninth attribute pattern is ^mg|mg/ml|mg/g^' do
74
+ attr(9).pattern.should == '^mg|mg/ml|mg/g^'
75
+ end
76
+
77
+ it 'ninth attribute assumed value is mg' do
78
+ attr(9).assumed_value.should == 'mg'
79
+ end
80
+
81
+ it 'tenth attribute list is apple, pear' do
82
+ attr(10).list.should == ['apple','pear']
83
+ end
84
+
85
+ it 'tenth attribute assumed value is orange' do
86
+ attr(10).assumed_value.should == 'orange'
87
+ end
88
+ end
89
+
90
+ context 'Boolean constraint' do
91
+ before(:all) do
92
+ @constraints = const(1)
93
+ end
94
+
95
+ it 'first attribute is true valid' do
96
+ attr(1).should be_true_valid
97
+ end
98
+
99
+ it 'first attribute is not false valid' do
100
+ attr(1).should_not be_false_valid
101
+ end
102
+
103
+ it 'second attribute is not true valid' do
104
+ attr(2).should_not be_true_valid
105
+ end
106
+
107
+ it 'second attribute is false valid' do
108
+ attr(2).should be_false_valid
109
+ end
110
+
111
+ it 'third attribute is true valid' do
112
+ attr(3).should be_true_valid
113
+ end
114
+
115
+ it 'third attrubute is false_valid' do
116
+ attr(3).should be_false_valid
117
+ end
118
+
119
+ it 'fourth attribute is true valid' do
120
+ attr(4).should be_true_valid
121
+ end
122
+
123
+ it 'fourth attribute is not false valid' do
124
+ attr(4).should_not be_false_valid
125
+ end
126
+
127
+ it 'fourth attribute is asumed false' do
128
+ attr(4).assumed_value.should be_false
129
+ end
130
+
131
+ it 'fifth attribute is not true valid' do
132
+ attr(5).should_not be_true_valid
133
+ end
134
+
135
+ it 'fifth attribute is false valid' do
136
+ attr(5).should be_false_valid
137
+ end
138
+
139
+ it 'fifth attribute is assumed true' do
140
+ attr(5).assumed_value.should be_true
141
+ end
142
+
143
+ it 'sixth attribute is true valid' do
144
+ attr(6).should be_true_valid
145
+ end
146
+
147
+ it 'sixth attribute is false valid' do
148
+ attr(6).should be_false_valid
149
+ end
150
+
151
+ it 'sixth attribute is assumed true' do
152
+ attr(6).assumed_value.should be_true
153
+ end
154
+ end
155
+
156
+ context 'Integer constraint' do
157
+ before(:all) do
158
+ @constraints = const(2)
159
+ end
160
+
161
+ context 'first attribute' do
162
+ it 'list is 55' do
163
+ attr(1).list.should == [55]
164
+ end
165
+
166
+ it 'assumed value is nil' do
167
+ attr(1).should_not have_assumed_value
168
+ end
169
+ end
170
+
171
+ context 'second attribute' do
172
+ it 'list is 10,20,30' do
173
+ attr(2).list.should == [10,20,30]
174
+ end
175
+
176
+ it 'assumed value is nil' do
177
+ attr(2).should_not have_assumed_value
178
+ end
179
+ end
180
+
181
+ context 'third attribute' do
182
+ it 'upper range is 100' do
183
+ attr(3).range.upper.should be 100
184
+ end
185
+
186
+ it 'lower range is 0' do
187
+ attr(3).range.lower.should be 0
188
+ end
189
+
190
+ it 'lower included' do
191
+ attr(3).range.should be_lower_included
192
+ end
193
+
194
+ it 'upper included' do
195
+ attr(3).range.should be_upper_included
196
+ end
197
+
198
+ it 'assumed_value is nil' do
199
+ attr(3).should_not have_assumed_value
200
+ end
201
+ end
202
+
203
+ context 'fourth attribute' do
204
+ it 'lower range is 10' do
205
+ attr(4).range.lower.should be 10
206
+ end
207
+
208
+ it 'is not lower included' do
209
+ attr(4).range.should_not be_lower_included
210
+ end
211
+
212
+ it 'is upper unbounded' do
213
+ attr(4).range.should be_upper_unbounded
214
+ end
215
+
216
+ it 'assumed value is nil' do
217
+ attr(4).should_not have_assumed_value
218
+ end
219
+ end
220
+
221
+ context 'fifth attribute' do
222
+ it 'upper range is 10' do
223
+ attr(5).range.upper.should be 10
224
+ end
225
+
226
+ it 'is not upper included' do
227
+ attr(5).range.should_not be_upper_included
228
+ end
229
+
230
+ it 'is lower unbounded' do
231
+ attr(5).range.should be_lower_unbounded
232
+ end
233
+
234
+ it 'assumed value is nil' do
235
+ attr(5).should_not have_assumed_value
236
+ end
237
+ end
238
+
239
+ context 'sixth attribute' do
240
+ it 'lower range is 10' do
241
+ attr(6).range.lower.should be 10
242
+ end
243
+
244
+ it 'is lower included' do
245
+ attr(6).range.should be_lower_included
246
+ end
247
+
248
+ it 'is upper_unbounded' do
249
+ attr(6).range.should be_upper_unbounded
250
+ end
251
+
252
+ it 'assumed value is nil' do
253
+ attr(6).should_not have_assumed_value
254
+ end
255
+ end
256
+
257
+ context 'seventh attribute' do
258
+ it 'upper range is 10' do
259
+ attr(7).range.upper.should be 10
260
+ end
261
+
262
+ it 'is upper included' do
263
+ attr(7).range.should be_upper_included
264
+ end
265
+
266
+ it 'is lower unbounded' do
267
+ attr(7).range.should be_lower_unbounded
268
+ end
269
+
270
+ it 'does not have assumed value' do
271
+ attr(7).should_not have_assumed_value
272
+ end
273
+ end
274
+
275
+ context 'eighth attribute' do
276
+ it 'lower range is -10' do
277
+ attr(8).range.lower.should be -10
278
+ end
279
+
280
+ it 'upper range is -5' do
281
+ attr(8).range.upper.should be -5
282
+ end
283
+
284
+ it 'is lower included' do
285
+ attr(8).range.should be_lower_included
286
+ end
287
+
288
+ it 'is upper included' do
289
+ attr(8).range.should be_upper_included
290
+ end
291
+
292
+ it 'does not have assumed value' do
293
+ attr(8).should_not have_assumed_value
294
+ end
295
+ end
296
+
297
+ # integer attr9 was passed
298
+
299
+ context 'ninth attribute' do
300
+ it 'list is 50' do
301
+ attr(9).list.should == [55]
302
+ end
303
+
304
+ it 'has assumed value' do
305
+ attr(9).should have_assumed_value
306
+ end
307
+
308
+ it 'assumed value is 50' do
309
+ attr(9).assumed_value.should be 50
310
+ end
311
+ end
312
+
313
+ context 'tenth attribute' do
314
+ it 'list is 10,20,30' do
315
+ attr(10).list.should == [10,20,30]
316
+ end
317
+
318
+ it 'assumed value is 20' do
319
+ attr(10).assumed_value.should be 20
320
+ end
321
+ end
322
+
323
+ context 'eleventh attribute' do
324
+ it 'lower range is 0' do
325
+ attr(11).range.lower.should be 0
326
+ end
327
+
328
+ it 'upper range is 100' do
329
+ attr(11).range.upper.should be 100
330
+ end
331
+
332
+ it 'is lower included' do
333
+ attr(11).range.should be_lower_included
334
+ end
335
+
336
+ it 'is upper included' do
337
+ attr(11).range.should be_upper_included
338
+ end
339
+
340
+ it 'assumed value is 50' do
341
+ attr(11).assumed_value.should be 50
342
+ end
343
+ end
344
+
345
+ context 'twelfth attribute' do
346
+ it 'lower range is 10' do
347
+ attr(12).range.lower.should be 10
348
+ end
349
+
350
+ it 'is not lower included' do
351
+ attr(12).range.should_not be_lower_included
352
+ end
353
+
354
+ it 'is upper unbounded' do
355
+ attr(12).range.should be_upper_unbounded
356
+ end
357
+
358
+ it 'assumed value is 20' do
359
+ attr(12).assumed_value.should be 20
360
+ end
361
+ end
362
+
363
+ context 'thirteenth attribute' do
364
+ it 'upper range is 10' do
365
+ attr(13).range.upper.should be 10
366
+ end
367
+
368
+ it 'is not upper included' do
369
+ attr(13).range.should_not be_upper_included
370
+ end
371
+
372
+ it 'is lower unbounded' do
373
+ attr(13).range.should be_lower_unbounded
374
+ end
375
+
376
+ it 'assumed value is 5' do
377
+ attr(13).assumed_value.should be 5
378
+ end
379
+ end
380
+
381
+ context 'fourteenth attribute' do
382
+ it 'lower range is 10' do
383
+ attr(14).range.lower.should be 10
384
+ end
385
+
386
+ it 'is lower included' do
387
+ attr(14).range.should be_lower_included
388
+ end
389
+
390
+ it 'is upper unbounded' do
391
+ attr(14).range.should be_upper_unbounded
392
+ end
393
+
394
+ it 'assumed value is 12' do
395
+ attr(14).assumed_value.should be 12
396
+ end
397
+ end
398
+
399
+ context '15th attribute' do
400
+ it 'upper range is 10' do
401
+ attr(15).range.upper.should be 10
402
+ end
403
+
404
+ it 'is upper included' do
405
+ attr(15).range.should be_upper_included
406
+ end
407
+
408
+ it 'is lower unbounded' do
409
+ attr(15).range.should be_lower_unbounded
410
+ end
411
+
412
+ it 'assumed value is 8' do
413
+ attr(15).assumed_value.should be 8
414
+ end
415
+ end
416
+
417
+ context '16th attribute' do
418
+ it 'lower range is -10' do
419
+ attr(16).range.lower.should be -10
420
+ end
421
+
422
+ it 'upper range is -5' do
423
+ attr(16).range.upper.should be -5
424
+ end
425
+
426
+ it 'is upper included' do
427
+ attr(16).range.should be_upper_included
428
+ end
429
+
430
+ it 'is lower included' do
431
+ attr(16).range.should be_lower_included
432
+ end
433
+
434
+ it 'assumed value is -7' do
435
+ attr(16).assumed_value.should be -7
436
+ end
437
+ end
438
+
439
+ context '17th attribute' do
440
+ it 'upper range is 100' do
441
+ attr(17).range.upper.should be 100
442
+ end
443
+
444
+ it 'lower range is 100' do
445
+ attr(17).range.lower.should be 100
446
+ end
447
+
448
+ it 'is lower included' do
449
+ attr(17).range.should be_lower_included
450
+ end
451
+
452
+ it 'is upper included' do
453
+ attr(17).range.should be_upper_included
454
+ end
455
+
456
+ it 'does not have assumed value' do
457
+ attr(17).should_not have_assumed_value
458
+ end
459
+ end
460
+
461
+ context '18th attribute' do
462
+ before(:all) do
463
+ @attribute = attr(18)
464
+ end
465
+
466
+ it 'upper range is 100' do
467
+ @attribute.range.upper.should be 100
468
+ end
469
+
470
+ it 'lower range is 0' do
471
+ @attribute.range.lower.should be 0
472
+ end
473
+
474
+ it 'is not lower inlcuded' do
475
+ @attribute.range.should_not be_lower_included
476
+ end
477
+
478
+ it 'is upper included' do
479
+ @attribute.range.should be_upper_included
480
+ end
481
+
482
+ it 'does not have assumed value' do
483
+ @attribute.should_not have_assumed_value
484
+ end
485
+ end
486
+
487
+ context '19th attribute' do
488
+ before(:all) do
489
+ @attribute = attr(19)
490
+ end
491
+
492
+ it 'upper range is 100' do
493
+ @attribute.range.upper.should be 100
494
+ end
495
+
496
+ it 'lower range is 0' do
497
+ @attribute.range.lower.should be 0
498
+ end
499
+
500
+ it 'is lower included' do
501
+ @attribute.range.should be_lower_included
502
+ end
503
+
504
+ it 'is not upper included' do
505
+ @attribute.range.should_not be_upper_included
506
+ end
507
+
508
+ it 'does not have assumed value' do
509
+ @attribute.should_not have_assumed_value
510
+ end
511
+ end
512
+
513
+ context '20th attribute |>0..<100|' do
514
+ before(:all) do
515
+ @attribute = attr(20)
516
+ end
517
+
518
+ it 'upper range is 100' do
519
+ @attribute.range.upper.should be 100
520
+ end
521
+
522
+ it 'lower range is 0' do
523
+ @attribute.range.lower.should be 0
524
+ end
525
+
526
+ it 'is not lower included' do
527
+ @attribute.range.should_not be_lower_included
528
+ end
529
+
530
+ it 'is not upper included' do
531
+ @attribute.range.should_not be_upper_included
532
+ end
533
+
534
+ it 'does not have assumed value' do
535
+ @attribute.should_not have_assumed_value
536
+ end
537
+ end
538
+ end
539
+
540
+ context 'Real constraint' do
541
+ before(:all) do
542
+ @constraints = const(3)
543
+ end
544
+
545
+ context '1st attribute' do
546
+ before(:all) do
547
+ @at = attr(1)
548
+ end
549
+
550
+ it 'list is 100.0' do
551
+ @at.list.should == [100.0]
552
+ end
553
+
554
+ it 'assumed value is nil' do
555
+ @at.should_not have_assumed_value
556
+ end
557
+ end
558
+
559
+ context '2nd attribute' do
560
+ before(:all) do
561
+ @at = attr(2)
562
+ end
563
+
564
+ it 'list is 100.0' do
565
+ @at.list.should == [10.0, 20.0, 30.0]
566
+ end
567
+
568
+ it 'assumed value is nil' do
569
+ @at.should_not have_assumed_value
570
+ end
571
+ end
572
+
573
+ context '3rd attribute' do
574
+ before(:all) do
575
+ @at = attr(3)
576
+ end
577
+
578
+ it 'lower range is 0.0' do
579
+ @at.range.lower.should == 0.0
580
+ end
581
+
582
+ it 'upper range is 100.0' do
583
+ @at.range.upper.should == 100.0
584
+ end
585
+
586
+ it 'assumed value is nil' do
587
+ @at.should_not have_assumed_value
588
+ end
589
+ end
590
+
591
+ context '4th attribute' do
592
+ before(:all) do
593
+ @at = attr(4)
594
+ end
595
+
596
+ it 'lower range is 10' do
597
+ @at.range.lower.should == 10.0
598
+ end
599
+
600
+ it 'is not lower included' do
601
+ @at.range.should_not be_lower_included
602
+ end
603
+
604
+ it 'is upper unbounded' do
605
+ @at.range.should be_upper_unbounded
606
+ end
607
+
608
+ it 'assumed value is nil' do
609
+ @at.should_not have_assumed_value
610
+ end
611
+ end
612
+
613
+ context '5th attribute' do
614
+ before(:all) do
615
+ @at = attr(5)
616
+ end
617
+
618
+ it 'upper range is 10.0' do
619
+ @at.range.upper.should == 10.0
620
+ end
621
+
622
+ it 'is not upper included' do
623
+ @at.range.should_not be_upper_included
624
+ end
625
+
626
+ it 'is lower unbounded' do
627
+ @at.range.should be_lower_unbounded
628
+ end
629
+
630
+ it 'assumed value is nil' do
631
+ @at.should_not have_assumed_value
632
+ end
633
+ end
634
+
635
+ context '6th attribute' do
636
+ before(:all) do
637
+ @at = attr(6)
638
+ end
639
+
640
+ it 'lower range is 10.0' do
641
+ @at.range.lower.should == 10.0
642
+ end
643
+
644
+ it 'is lower included' do
645
+ @at.range.should be_lower_included
646
+ end
647
+
648
+ it 'is upper_unbounded' do
649
+ @at.range.should be_upper_unbounded
650
+ end
651
+
652
+ it 'assumed value is nil' do
653
+ @at.should_not have_assumed_value
654
+ end
655
+ end
656
+
657
+ context '7th attribute' do
658
+ before(:all) do
659
+ @at = attr(7)
660
+ end
661
+
662
+ it 'upper range is 10.0' do
663
+ @at.range.upper.should ==10.0
664
+ end
665
+
666
+ it 'is upper included' do
667
+ @at.range.should be_upper_included
668
+ end
669
+
670
+ it 'is lower unbounded' do
671
+ @at.range.should be_lower_unbounded
672
+ end
673
+
674
+ it 'does not have assumed value' do
675
+ @at.should_not have_assumed_value
676
+ end
677
+ end
678
+
679
+ context '8th attribute' do
680
+ before(:all) do
681
+ @at = attr(8)
682
+ end
683
+
684
+ it 'lower range is -10.0' do
685
+ @at.range.lower.should == -10.0
686
+ end
687
+
688
+ it 'upper range is -5.0' do
689
+ @at.range.upper.should == -5.0
690
+ end
691
+
692
+ it 'is lower included' do
693
+ @at.range.should be_lower_included
694
+ end
695
+
696
+ it 'is upper included' do
697
+ @at.range.should be_upper_included
698
+ end
699
+
700
+ it 'does not have assumed value' do
701
+ @at.should_not have_assumed_value
702
+ end
703
+ end
704
+
705
+ context '9th attribute' do
706
+ before(:all) do
707
+ @at = attr(9)
708
+ end
709
+
710
+ it 'list is 100.0' do
711
+ @at.list.should == [100.0]
712
+ end
713
+
714
+ it 'has assumed value' do
715
+ @at.should have_assumed_value
716
+ end
717
+
718
+ it 'assumed value is 50' do
719
+ @at.assumed_value.should == 80.0
720
+ end
721
+ end
722
+
723
+ context '10th attribute' do
724
+ before(:all) do
725
+ @at = attr(10)
726
+ end
727
+
728
+ it 'list is 10.0,20.0,30.0' do
729
+ @at.list.should == [10.0,20.0,30.0]
730
+ end
731
+
732
+ it 'assumed value is 20.0' do
733
+ @at.assumed_value.should == 20.0
734
+ end
735
+ end
736
+
737
+ context '11th attribute' do
738
+ before(:all) do
739
+ @at = attr(11)
740
+ end
741
+
742
+ it 'lower range is 0.0' do
743
+ @at.range.lower.should == 0.0
744
+ end
745
+
746
+ it 'upper range is 100.0' do
747
+ @at.range.upper.should == 100.0
748
+ end
749
+
750
+ it 'is lower included' do
751
+ @at.range.should be_lower_included
752
+ end
753
+
754
+ it 'is upper included' do
755
+ @at.range.should be_upper_included
756
+ end
757
+
758
+ it 'assumed value is 60.0' do
759
+ @at.assumed_value.should == 60.0
760
+ end
761
+ end
762
+
763
+ context '12th attribute' do
764
+ before(:all) do
765
+ @at = attr(12)
766
+ end
767
+
768
+ it 'lower range is 10.0' do
769
+ @at.range.lower.should == 10.0
770
+ end
771
+
772
+ it 'is not lower included' do
773
+ @at.range.should_not be_lower_included
774
+ end
775
+
776
+ it 'is upper unbounded' do
777
+ @at.range.should be_upper_unbounded
778
+ end
779
+
780
+ it 'assumed value is 30.0' do
781
+ @at.assumed_value.should == 30.0
782
+ end
783
+ end
784
+
785
+ context '13th attribute' do
786
+ before(:all) do
787
+ @at = attr(13)
788
+ end
789
+
790
+ it 'upper range is 10.0' do
791
+ @at.range.upper.should == 10
792
+ end
793
+
794
+ it 'is not upper included' do
795
+ @at.range.should_not be_upper_included
796
+ end
797
+
798
+ it 'is lower unbounded' do
799
+ @at.range.should be_lower_unbounded
800
+ end
801
+
802
+ it 'assumed value is 2.0' do
803
+ @at.assumed_value.should == 2.0
804
+ end
805
+ end
806
+
807
+ context '14th attribute' do
808
+ before(:all) do
809
+ @at = attr(14)
810
+ end
811
+
812
+ it 'lower range is 10.0' do
813
+ @at.range.lower.should == 10.0
814
+ end
815
+
816
+ it 'is lower included' do
817
+ @at.range.should be_lower_included
818
+ end
819
+
820
+ it 'is upper unbounded' do
821
+ @at.range.should be_upper_unbounded
822
+ end
823
+
824
+ it 'assumed value is 10.0' do
825
+ @at.assumed_value.should == 10.0
826
+ end
827
+ end
828
+
829
+ context '15th attribute' do
830
+ before(:all) do
831
+ @at = attr(15)
832
+ end
833
+
834
+ it 'upper range is 10.0' do
835
+ @at.range.upper.should == 10.0
836
+ end
837
+
838
+ it 'is upper included' do
839
+ @at.range.should be_upper_included
840
+ end
841
+
842
+ it 'is lower unbounded' do
843
+ @at.range.should be_lower_unbounded
844
+ end
845
+
846
+ it 'assumed value is 9.0' do
847
+ @at.assumed_value.should == 9.0
848
+ end
849
+ end
850
+
851
+ context '16th attribute' do
852
+ before(:all) do
853
+ @at = attr(16)
854
+ end
855
+
856
+ it 'lower range is -10.0' do
857
+ @at.range.lower.should == -10.0
858
+ end
859
+
860
+ it 'upper range is -5.0' do
861
+ @at.range.upper.should == -5.0
862
+ end
863
+
864
+ it 'is upper included' do
865
+ @at.range.should be_upper_included
866
+ end
867
+
868
+ it 'is lower included' do
869
+ @at.range.should be_lower_included
870
+ end
871
+
872
+ it 'assumed value is -8.0' do
873
+ @at.assumed_value.should == -8.0
874
+ end
875
+ end
876
+
877
+ context '17th attribute' do
878
+ before(:all) do
879
+ @at = attr(17)
880
+ end
881
+
882
+ it 'upper range is 100.0' do
883
+ @at.range.upper.should == 100.0
884
+ end
885
+
886
+ it 'lower range is 100.0' do
887
+ @at.range.lower.should == 100.0
888
+ end
889
+
890
+ it 'is lower included' do
891
+ @at.range.should be_lower_included
892
+ end
893
+
894
+ it 'is upper included' do
895
+ @at.range.should be_upper_included
896
+ end
897
+
898
+ it 'does not have assumed value' do
899
+ @at.should_not have_assumed_value
900
+ end
901
+ end
902
+
903
+ context '18th attribute' do
904
+ before(:all) do
905
+ @attribute = attr(18)
906
+ end
907
+
908
+ it 'upper range is 100' do
909
+ @attribute.range.upper.should == 100.0
910
+ end
911
+
912
+ it 'lower range is 0' do
913
+ @attribute.range.lower.should == 0.0
914
+ end
915
+
916
+ it 'is not lower inlcuded' do
917
+ @attribute.range.should_not be_lower_included
918
+ end
919
+
920
+ it 'is upper included' do
921
+ @attribute.range.should be_upper_included
922
+ end
923
+
924
+ it 'does not have assumed value' do
925
+ @attribute.should_not have_assumed_value
926
+ end
927
+ end
928
+
929
+ context '19th attribute' do
930
+ before(:all) do
931
+ @attribute = attr(19)
932
+ end
933
+
934
+ it 'upper range is 100.0' do
935
+ @attribute.range.upper.should == 100.0
936
+ end
937
+
938
+ it 'lower range is 0.0' do
939
+ @attribute.range.lower.should == 0.0
940
+ end
941
+
942
+ it 'is lower included' do
943
+ @attribute.range.should be_lower_included
944
+ end
945
+
946
+ it 'is not upper included' do
947
+ @attribute.range.should_not be_upper_included
948
+ end
949
+
950
+ it 'does not have assumed value' do
951
+ @attribute.should_not have_assumed_value
952
+ end
953
+ end
954
+
955
+ context '20th attribute |>0..<100|' do
956
+ before(:all) do
957
+ @attribute = attr(20)
958
+ end
959
+
960
+ it 'upper range is 100.0' do
961
+ @attribute.range.upper.should == 100.0
962
+ end
963
+
964
+ it 'lower range is 0.0' do
965
+ @attribute.range.lower.should == 0.0
966
+ end
967
+
968
+ it 'is not lower included' do
969
+ @attribute.range.should_not be_lower_included
970
+ end
971
+
972
+ it 'is not upper included' do
973
+ @attribute.range.should_not be_upper_included
974
+ end
975
+
976
+ it 'does not have assumed value' do
977
+ @attribute.should_not have_assumed_value
978
+ end
979
+ end
980
+ end
981
+
982
+ context 'Date constraint' do
983
+ before(:all) do
984
+ @constraints = const(4)
985
+ end
986
+
987
+ context '1st attribute yyyy-mm-dd' do
988
+ before(:all) do
989
+ @at = attr(1)
990
+ end
991
+
992
+ it 'pattern is yyyy-mm-dd' do
993
+ @at.pattern.should == 'yyyy-mm-dd'
994
+ end
995
+
996
+ it 'does not have assumed value' do
997
+ @at.should_not have_assumed_value
998
+ end
999
+ end
1000
+
1001
+ context '2nd attribute yyyy-??-??' do
1002
+ before(:all) do
1003
+ @at = attr(2)
1004
+ end
1005
+
1006
+ it 'pattern is yyyy-??-' do
1007
+ @at.pattern.should == 'yyyy-??-??'
1008
+ end
1009
+
1010
+ it 'does not have assumed value' do
1011
+ @at.should_not have_assumed_value
1012
+ end
1013
+ end
1014
+
1015
+ context '3rd attribute yyyy-mm-??' do
1016
+ before(:all) do
1017
+ @at = attr(3)
1018
+ end
1019
+
1020
+ it 'pattern is yyyy-mm-??' do
1021
+ @at.pattern.should == 'yyyy-mm-??'
1022
+ end
1023
+
1024
+ it 'does not have assumed value' do
1025
+ @at.should_not have_assumed_value
1026
+ end
1027
+ end
1028
+
1029
+ context '4th attribute yyyy-??-XX' do
1030
+ before(:all) do
1031
+ @at = attr(4)
1032
+ end
1033
+
1034
+ it 'pattern is yyyy-??-XX' do
1035
+ @at.pattern.should == 'yyyy-??-XX'
1036
+ end
1037
+
1038
+ it 'does not have assumed value' do
1039
+ @at.should_not have_assumed_value
1040
+ end
1041
+ end
1042
+
1043
+ context '5th attribute 1983-12-25' do
1044
+ before(:all) do
1045
+ @at = attr(5)
1046
+ end
1047
+
1048
+ it 'a first item of list is 1983-12-25' do
1049
+ @at.list[0].value.should == '1983-12-25'
1050
+ end
1051
+
1052
+ it 'does not have assumed value' do
1053
+ @at.should_not have_assumed_value
1054
+ end
1055
+ end
1056
+
1057
+ context '6th attribute 2000-01-01' do
1058
+ before(:all) do
1059
+ @at = attr(6)
1060
+ end
1061
+
1062
+ it 'a first item of list is 2000-01-01' do
1063
+ @at.list[0].value.should == '2000-01-01'
1064
+ end
1065
+
1066
+ it 'does not have assumed value' do
1067
+ @at.should_not have_assumed_value
1068
+ end
1069
+ end
1070
+
1071
+ context '7th attribute |2004-09-20..2004-10-20|' do
1072
+ before(:all) do
1073
+ @at = attr(7)
1074
+ end
1075
+
1076
+ it 'lower range is 2004-09-20' do
1077
+ @at.range.lower.value.should == '2004-09-20'
1078
+ end
1079
+
1080
+ it 'is lower included' do
1081
+ @at.range.should be_lower_included
1082
+ end
1083
+
1084
+ it 'upper range is 2004-10-20' do
1085
+ @at.range.upper.value.should == '2004-10-20'
1086
+ end
1087
+
1088
+ it 'is upper included' do
1089
+ @at.range.should be_upper_included
1090
+ end
1091
+
1092
+ it 'does not have assumed value' do
1093
+ @at.should_not have_assumed_value
1094
+ end
1095
+ end
1096
+
1097
+ context '8th attribute |< 2004-09-20|' do
1098
+ before(:all) do
1099
+ @at = attr(8)
1100
+ end
1101
+
1102
+ it 'upper range is 2004-09-20' do
1103
+ @at.range.upper.value.should == '2004-09-20'
1104
+ end
1105
+
1106
+ it 'is not upper included' do
1107
+ @at.range.should_not be_upper_included
1108
+ end
1109
+
1110
+ it 'is lower unbounded' do
1111
+ @at.range.should be_lower_unbounded
1112
+ end
1113
+
1114
+ it 'does not have assumed value' do
1115
+ @at.should_not have_assumed_value
1116
+ end
1117
+ end
1118
+
1119
+ context '9th attribute |<= 2004-09-20|' do
1120
+ before(:all) do
1121
+ @at = attr(9)
1122
+ end
1123
+
1124
+ it 'upper range is 2004-09-20' do
1125
+ @at.range.upper.value.should == '2004-09-20'
1126
+ end
1127
+
1128
+ it 'is upper included' do
1129
+ @at.range.should be_upper_included
1130
+ end
1131
+
1132
+ it 'is lower unbounded' do
1133
+ @at.range.should be_lower_unbounded
1134
+ end
1135
+
1136
+ it 'does not have assumed value' do
1137
+ @at.should_not have_assumed_value
1138
+ end
1139
+ end
1140
+
1141
+ context '10th attribute |> 2004-09-20|' do
1142
+ before(:all) do
1143
+ @at = attr(10)
1144
+ end
1145
+
1146
+ it 'lower range is 2004-09-20' do
1147
+ @at.range.lower.value.should == '2004-09-20'
1148
+ end
1149
+
1150
+ it 'is not lower included' do
1151
+ @at.range.should_not be_lower_included
1152
+ end
1153
+
1154
+ it 'is upper unbounded' do
1155
+ @at.range.should be_upper_unbounded
1156
+ end
1157
+
1158
+ it 'does not have assumed value' do
1159
+ @at.should_not have_assumed_value
1160
+ end
1161
+ end
1162
+
1163
+ context '11th attribute |>= 2004-09-20|' do
1164
+ before(:all) do
1165
+ @at = attr(11)
1166
+ end
1167
+
1168
+ it 'lower range is 2004-09-20' do
1169
+ @at.range.lower.value.should == '2004-09-20'
1170
+ end
1171
+
1172
+ it 'is lower included' do
1173
+ @at.range.should be_lower_included
1174
+ end
1175
+
1176
+ it 'is upper unbounded' do
1177
+ @at.range.should be_upper_unbounded
1178
+ end
1179
+
1180
+ it 'does not have assumed value' do
1181
+ @at.should_not have_assumed_value
1182
+ end
1183
+ end
1184
+
1185
+ context '12th attribute |2001-12-25, ...|' do
1186
+ before(:all) do
1187
+ @at = attr(12)
1188
+ end
1189
+
1190
+ it '1st item of list is 2001-12-25' do
1191
+ @at.list[0].value.should == '2001-12-25'
1192
+ end
1193
+
1194
+ it 'does not have assumed value' do
1195
+ @at.should_not have_assumed_value
1196
+ end
1197
+ end
1198
+
1199
+ context '13th attribute yyyy-mm-dd; 2000-01-01' do
1200
+ before(:all) do
1201
+ @at = attr(13)
1202
+ end
1203
+
1204
+ it 'pattern is yy-mm-dd' do
1205
+ @at.pattern.should == 'yyyy-mm-dd'
1206
+ end
1207
+
1208
+ it 'have assumed value' do
1209
+ @at.should have_assumed_value
1210
+ end
1211
+
1212
+ it 'assumed value is 2000-01-01' do
1213
+ @at.assumed_value.value.should == '2000-01-01'
1214
+ end
1215
+ end
1216
+
1217
+ context '14th attribute yyyy-??-??; 2001-01-01' do
1218
+ before(:all) do
1219
+ @at = attr(14)
1220
+ end
1221
+
1222
+ it 'pattern is yy-mm-dd' do
1223
+ @at.pattern.should == 'yyyy-??-??'
1224
+ end
1225
+
1226
+ it 'have assumed value' do
1227
+ @at.should have_assumed_value
1228
+ end
1229
+
1230
+ it 'assumed value is 2001-01-01' do
1231
+ @at.assumed_value.value.should == '2001-01-01'
1232
+ end
1233
+ end
1234
+
1235
+ context '15th attribute yyyy-mm-??; 2002-01-01' do
1236
+ before(:all) do
1237
+ @at = attr(15)
1238
+ end
1239
+
1240
+ it 'pattern is yyyy-mm-dd' do
1241
+ @at.pattern.should == 'yyyy-mm-??'
1242
+ end
1243
+
1244
+ it 'have assumed value' do
1245
+ @at.should have_assumed_value
1246
+ end
1247
+
1248
+ it 'assumed value is 2002-01-01' do
1249
+ @at.assumed_value.value.should == '2002-01-01'
1250
+ end
1251
+ end
1252
+
1253
+ context '16th attribute yyyy-??-XX; 2003-01-01' do
1254
+ before(:all) do
1255
+ @at = attr(16)
1256
+ end
1257
+
1258
+ it 'pattern is yyyy-??-XX' do
1259
+ @at.pattern.should == 'yyyy-??-XX'
1260
+ end
1261
+
1262
+ it 'have assumed value' do
1263
+ @at.should have_assumed_value
1264
+ end
1265
+
1266
+ it 'assumed value is 2003-01-01' do
1267
+ @at.assumed_value.value.should == '2003-01-01'
1268
+ end
1269
+ end
1270
+
1271
+ context '17th attribute 1983-12-25; 2004-01-01' do
1272
+ before(:all) do
1273
+ @at = attr(17)
1274
+ end
1275
+
1276
+ it '1st item of list is 1983-12-25' do
1277
+ @at.list[0].value.should == '1983-12-25'
1278
+ end
1279
+
1280
+ it 'have assumed value' do
1281
+ @at.should have_assumed_value
1282
+ end
1283
+
1284
+ it 'assumed value is 2004-01-01' do
1285
+ @at.assumed_value.value.should == '2004-01-01'
1286
+ end
1287
+ end
1288
+
1289
+ context '18th attribute 2000-01-01; 2005-01-01' do
1290
+ before(:all) do
1291
+ @at = attr(18)
1292
+ end
1293
+
1294
+ it '1st item of list is 2000-01-01' do
1295
+ @at.list[0].value.should == '2000-01-01'
1296
+ end
1297
+
1298
+ it 'have assumed value' do
1299
+ @at.should have_assumed_value
1300
+ end
1301
+
1302
+ it 'assumed value is 2005-01-01' do
1303
+ @at.assumed_value.value.should == '2005-01-01'
1304
+ end
1305
+ end
1306
+
1307
+ context '19th attribute |2004-09-20..2004-10-20|; 2004-09-30' do
1308
+ before(:all) do
1309
+ @at = attr(19)
1310
+ end
1311
+
1312
+ it 'lower range is 2004-09-20' do
1313
+ @at.range.lower.value.should == '2004-09-20'
1314
+ end
1315
+
1316
+ it 'is lower included' do
1317
+ @at.range.should be_lower_included
1318
+ end
1319
+
1320
+ it 'upper range is 2004-10-20' do
1321
+ @at.range.upper.value.should == '2004-10-20'
1322
+ end
1323
+
1324
+ it 'is upper included' do
1325
+ @at.range.should be_upper_included
1326
+ end
1327
+
1328
+ it 'have assumed value' do
1329
+ @at.should have_assumed_value
1330
+ end
1331
+
1332
+ it 'assumed value is 2004-09-30' do
1333
+ @at.assumed_value.value.should == '2004-09-30'
1334
+ end
1335
+ end
1336
+
1337
+ context '20th attribute |< 2004-09-20|; 2004-09-01' do
1338
+ before(:all) do
1339
+ @at = attr(20)
1340
+ end
1341
+
1342
+ it 'upper range is 2004-09-20' do
1343
+ @at.range.upper.value.should == '2004-09-20'
1344
+ end
1345
+
1346
+ it 'is not upper included' do
1347
+ @at.range.should_not be_upper_included
1348
+ end
1349
+
1350
+ it 'is lower unbounded' do
1351
+ @at.range.should be_lower_unbounded
1352
+ end
1353
+
1354
+ it 'have assumed value' do
1355
+ @at.should have_assumed_value
1356
+ end
1357
+
1358
+ it 'assumed_value is 2004-09-01' do
1359
+ @at.assumed_value.value.should == '2004-09-01'
1360
+ end
1361
+ end
1362
+
1363
+ context '21st attribute |<= 2004-09-20|; 2003-09-20' do
1364
+ before(:all) do
1365
+ @at = attr(21)
1366
+ end
1367
+
1368
+ it 'upper range is 2004-09-20' do
1369
+ @at.range.upper.value.should == '2004-09-20'
1370
+ end
1371
+
1372
+ it 'is upper included' do
1373
+ @at.range.should be_upper_included
1374
+ end
1375
+
1376
+ it 'is lower unbounded' do
1377
+ @at.range.should be_lower_unbounded
1378
+ end
1379
+
1380
+ it 'have assumed value' do
1381
+ @at.should have_assumed_value
1382
+ end
1383
+
1384
+ it 'assumed_value is 2003-09-20' do
1385
+ @at.assumed_value.value.should == '2003-09-20'
1386
+ end
1387
+ end
1388
+
1389
+ context '22nd attribute |> 2004-09-20|; 2005-01-02' do
1390
+ before(:all) do
1391
+ @at = attr(22)
1392
+ end
1393
+
1394
+ it 'lower range is 2004-09-20' do
1395
+ @at.range.lower.value.should == '2004-09-20'
1396
+ end
1397
+
1398
+ it 'is not lower included' do
1399
+ @at.range.should_not be_lower_included
1400
+ end
1401
+
1402
+ it 'is upper unbounded' do
1403
+ @at.range.should be_upper_unbounded
1404
+ end
1405
+
1406
+ it 'have assumed value' do
1407
+ @at.should have_assumed_value
1408
+ end
1409
+
1410
+ it 'assumed_value is 2005-01-02' do
1411
+ @at.assumed_value.value.should == '2005-01-02'
1412
+ end
1413
+ end
1414
+
1415
+ context '23rd attribute |>= 2004-09-20|; 2005-10-30' do
1416
+ before(:all) do
1417
+ @at = attr(23)
1418
+ end
1419
+
1420
+ it 'lower range is 2004-09-20' do
1421
+ @at.range.lower.value.should == '2004-09-20'
1422
+ end
1423
+
1424
+ it 'is lower included' do
1425
+ @at.range.should be_lower_included
1426
+ end
1427
+
1428
+ it 'is upper unbounded' do
1429
+ @at.range.should be_upper_unbounded
1430
+ end
1431
+
1432
+ it 'have assumed value' do
1433
+ @at.should have_assumed_value
1434
+ end
1435
+
1436
+ it 'assumed_value is 2005-10-30' do
1437
+ @at.assumed_value.value.should == '2005-10-30'
1438
+ end
1439
+ end
1440
+
1441
+ context '24th attribute |2004-09-20|' do
1442
+ before(:all) do
1443
+ @at = attr(24)
1444
+ end
1445
+
1446
+ it 'lower range is 2004-09-20' do
1447
+ @at.range.lower.value.should == '2004-09-20'
1448
+ end
1449
+
1450
+ it 'is lower included' do
1451
+ @at.range.should be_lower_included
1452
+ end
1453
+
1454
+ it 'upper range is 2004-09-20' do
1455
+ @at.range.upper.value.should == '2004-09-20'
1456
+ end
1457
+
1458
+ it 'is upper included' do
1459
+ @at.range.should be_upper_included
1460
+ end
1461
+
1462
+ it 'does not have assumed value' do
1463
+ @at.should_not have_assumed_value
1464
+ end
1465
+ end
1466
+
1467
+ context '25th attribute 1995-03' do
1468
+ before(:all) do
1469
+ @at = attr(25)
1470
+ end
1471
+
1472
+ it '1st item of list is 1995-03' do
1473
+ @at.list[0].value.should == '1995-03'
1474
+ end
1475
+
1476
+ it 'does not have assumed value' do
1477
+ @at.should_not have_assumed_value
1478
+ end
1479
+ end
1480
+ end
1481
+
1482
+ context 'Time constraint' do
1483
+ before(:all) do
1484
+ @constraints = const(5)
1485
+ end
1486
+
1487
+ context '1st attribute hh:mm:ss' do
1488
+ before(:all) do
1489
+ @at = attr(1)
1490
+ end
1491
+
1492
+ it 'pattern is hh:mm:ss' do
1493
+ @at.pattern.should == 'hh:mm:ss'
1494
+ end
1495
+
1496
+ it 'does not have assumed value' do
1497
+ @at.should_not have_assumed_value
1498
+ end
1499
+ end
1500
+
1501
+ context '2nd attribute hh:mm:XX' do
1502
+ before(:all) do
1503
+ @at = attr(2)
1504
+ end
1505
+
1506
+ it 'pattern is hh:mm:XX' do
1507
+ @at.pattern.should == 'hh:mm:XX'
1508
+ end
1509
+
1510
+ it 'does not have assumed value' do
1511
+ @at.should_not have_assumed_value
1512
+ end
1513
+ end
1514
+
1515
+ context '3rd attribute hh:??:XX' do
1516
+ before(:all) do
1517
+ @at = attr(3)
1518
+ end
1519
+
1520
+ it 'pattern is hh:??:XX' do
1521
+ @at.pattern.should == 'hh:??:XX'
1522
+ end
1523
+
1524
+ it 'does not have assumed value' do
1525
+ @at.should_not have_assumed_value
1526
+ end
1527
+ end
1528
+
1529
+ context '4th attribute hh:??:??' do
1530
+ before(:all) do
1531
+ @at = attr(4)
1532
+ end
1533
+
1534
+ it 'pattern is hh:??:??' do
1535
+ @at.pattern.should == 'hh:??:??'
1536
+ end
1537
+
1538
+ it 'does not have assumed value' do
1539
+ @at.should_not have_assumed_value
1540
+ end
1541
+ end
1542
+
1543
+ context '5th attribute 22:00:05' do
1544
+ before(:all) do
1545
+ @at = attr(5)
1546
+ end
1547
+
1548
+ it 'the 1st item of list is 22:00:05' do
1549
+ @at.list[0].value.should == '22:00:05'
1550
+ end
1551
+
1552
+ it 'does not have assumed value' do
1553
+ @at.should_not have_assumed_value
1554
+ end
1555
+ end
1556
+
1557
+ context '6th attribute 00:00:59' do
1558
+ before(:all) do
1559
+ @at = attr(6)
1560
+ end
1561
+
1562
+ it 'the 1st item of list is 00:00:59' do
1563
+ @at.list[0].value.should == '00:00:59'
1564
+ end
1565
+
1566
+ it 'does not have assumed value' do
1567
+ @at.should_not have_assumed_value
1568
+ end
1569
+ end
1570
+
1571
+ context '7th attribute 12:35' do
1572
+ before(:all) do
1573
+ @at = attr(7)
1574
+ end
1575
+
1576
+ it 'the 1st item of list is 12:35' do
1577
+ @at.list[0].value.should == '12:35'
1578
+ end
1579
+
1580
+ it 'does not have assumed value' do
1581
+ @at.should_not have_assumed_value
1582
+ end
1583
+ end
1584
+
1585
+ context '8th attribute 12:35:45,666' do
1586
+ before(:all) do
1587
+ @at = attr(8)
1588
+ end
1589
+
1590
+ it 'the 1st item of list is 12:35:45,666' do
1591
+ @at.list[0].value.should == '12:35:45,666'
1592
+ end
1593
+
1594
+ it 'does not have assumed value' do
1595
+ @at.should_not have_assumed_value
1596
+ end
1597
+ end
1598
+
1599
+ context '9th attribute 12:35:45-0700' do
1600
+ before(:all) do
1601
+ @at = attr(9)
1602
+ end
1603
+
1604
+ it 'the 1st item of list is 12:35:45-0700' do
1605
+ @at.list[0].value.should == '12:35:45-0700'
1606
+ end
1607
+
1608
+ it 'does not have assumed value' do
1609
+ @at.should_not have_assumed_value
1610
+ end
1611
+ end
1612
+
1613
+ context '10th attribute 12:35:45+0800' do
1614
+ before(:all) do
1615
+ @at = attr(10)
1616
+ end
1617
+
1618
+ it 'the 1st item of list is 12:35:45+0800' do
1619
+ @at.list[0].value.should == '12:35:45+0800'
1620
+ end
1621
+
1622
+ it 'does not have assumed value' do
1623
+ @at.should_not have_assumed_value
1624
+ end
1625
+ end
1626
+
1627
+ context '11th attribute 12:35:45,999-0700' do
1628
+ before(:all) do
1629
+ @at = attr(11)
1630
+ end
1631
+
1632
+ it 'the 1st item of list is 12:35:45,999-0700' do
1633
+ @at.list[0].value.should == '12:35:45,999-0700'
1634
+ end
1635
+
1636
+ it 'does not have assumed value' do
1637
+ @at.should_not have_assumed_value
1638
+ end
1639
+ end
1640
+
1641
+ context '12th attribute 12:35:45,000+0000' do
1642
+ before(:all) do
1643
+ @at = attr(12)
1644
+ end
1645
+
1646
+ it 'the 1st item of list is 12:35:45,000+0800' do
1647
+ @at.list[0].value.should == '12:35:45,000+0800'
1648
+ end
1649
+
1650
+ it 'does not have assumed value' do
1651
+ @at.should_not have_assumed_value
1652
+ end
1653
+ end
1654
+
1655
+ context '13th attribute 12:35:45,000Z' do
1656
+ before(:all) do
1657
+ @at = attr(13)
1658
+ end
1659
+
1660
+ it 'the 1st item of list is 12:35:45,000Z' do
1661
+ @at.list[0].value.should == '12:35:45,000Z'
1662
+ end
1663
+
1664
+ it 'does not have assumed value' do
1665
+ @at.should_not have_assumed_value
1666
+ end
1667
+ end
1668
+
1669
+ context '14th attribute 12:35:45,995-0700' do
1670
+ before(:all) do
1671
+ @at = attr(14)
1672
+ end
1673
+
1674
+ it 'the 1st item of list is 12:35:45,995-0700' do
1675
+ @at.list[0].value.should == '12:35:45,995-0700'
1676
+ end
1677
+
1678
+ it 'does not have assumed value' do
1679
+ @at.should_not have_assumed_value
1680
+ end
1681
+ end
1682
+
1683
+ context '15th attribute 12:35:45,001+0800' do
1684
+ before(:all) do
1685
+ @at = attr(15)
1686
+ end
1687
+
1688
+ it 'the 1st item of list is 12:35:45,001+0800' do
1689
+ @at.list[0].value.should == '12:35:45,001+0800'
1690
+ end
1691
+
1692
+ it 'does not have assumed value' do
1693
+ @at.should_not have_assumed_value
1694
+ end
1695
+ end
1696
+
1697
+ context '16th attribute |12:35..16:35|' do
1698
+ before(:all) do
1699
+ @at = attr(16)
1700
+ end
1701
+
1702
+ it 'lower range is 12:35' do
1703
+ @at.range.lower.value.should == '12:35'
1704
+ end
1705
+
1706
+ it 'upper range is 16:35' do
1707
+ @at.range.upper.value.should == '16:35'
1708
+ end
1709
+
1710
+ it 'does not have assumed value' do
1711
+ @at.should_not have_assumed_value
1712
+ end
1713
+ end
1714
+
1715
+ context '17th attribute |< 12:35|' do
1716
+ before(:all) do
1717
+ @at = attr(17)
1718
+ end
1719
+
1720
+ it 'upper range is 12:35' do
1721
+ @at.range.upper.value.should == '12:35'
1722
+ end
1723
+
1724
+ it 'is not upper included' do
1725
+ @at.range.should_not be_upper_included
1726
+ end
1727
+
1728
+ it 'is lower unbounded' do
1729
+ @at.range.should be_lower_unbounded
1730
+ end
1731
+
1732
+ it 'does not have assumed value' do
1733
+ @at.should_not have_assumed_value
1734
+ end
1735
+ end
1736
+
1737
+ context '18th attribute |<= 12:35|' do
1738
+ before(:all) do
1739
+ @at = attr(18)
1740
+ end
1741
+
1742
+ it 'upper range is 12:35' do
1743
+ @at.range.upper.value.should == '12:35'
1744
+ end
1745
+
1746
+ it 'is upper included' do
1747
+ @at.range.should be_upper_included
1748
+ end
1749
+
1750
+ it 'is lower unbounded' do
1751
+ @at.range.should be_lower_unbounded
1752
+ end
1753
+
1754
+ it 'does not have assumed value' do
1755
+ @at.should_not have_assumed_value
1756
+ end
1757
+ end
1758
+
1759
+ context '19th attribute |> 12:35|' do
1760
+ before(:all) do
1761
+ @at = attr(19)
1762
+ end
1763
+
1764
+ it 'lower range is 12:35' do
1765
+ @at.range.lower.value.should == '12:35'
1766
+ end
1767
+
1768
+ it 'is not lower included' do
1769
+ @at.range.should_not be_lower_included
1770
+ end
1771
+
1772
+ it 'is upper unbounded' do
1773
+ @at.range.should be_upper_unbounded
1774
+ end
1775
+
1776
+ it 'does not have assumed value' do
1777
+ @at.should_not have_assumed_value
1778
+ end
1779
+ end
1780
+
1781
+ context '20th attribute |>= 12:35|' do
1782
+ before(:all) do
1783
+ @at = attr(20)
1784
+ end
1785
+
1786
+ it 'lower range is 12:35' do
1787
+ @at.range.lower.value.should == '12:35'
1788
+ end
1789
+
1790
+ it 'is lower included' do
1791
+ @at.range.should be_lower_included
1792
+ end
1793
+
1794
+ it 'is upper unbounded' do
1795
+ @at.range.should be_upper_unbounded
1796
+ end
1797
+
1798
+ it 'does not have assumed value' do
1799
+ @at.should_not have_assumed_value
1800
+ end
1801
+ end
1802
+
1803
+ context '21st attribute hh:mm:ss; 10:00:00' do
1804
+ before(:all) do
1805
+ @at = attr(21)
1806
+ end
1807
+
1808
+ it 'pattern is hh:mm:ss' do
1809
+ @at.pattern.should == 'hh:mm:ss'
1810
+ end
1811
+
1812
+ it 'has assumed value' do
1813
+ @at.should have_assumed_value
1814
+ end
1815
+
1816
+ it 'assumed value is 10:00:00' do
1817
+ @at.assumed_value.value.should == '10:00:00'
1818
+ end
1819
+ end
1820
+
1821
+ context '22nd attribute hh:mm:XX; 10:00:00' do
1822
+ before(:all) do
1823
+ @at = attr(22)
1824
+ end
1825
+
1826
+ it 'pattern is hh:mm:XX' do
1827
+ @at.pattern.should == 'hh:mm:XX'
1828
+ end
1829
+
1830
+ it 'has assumed value' do
1831
+ @at.should have_assumed_value
1832
+ end
1833
+
1834
+ it 'assumed value is 10:00:00' do
1835
+ @at.assumed_value.value.should == '10:00:00'
1836
+ end
1837
+ end
1838
+
1839
+ context '23rd attribute hh:??:XX; 10:00:00' do
1840
+ before(:all) do
1841
+ @at = attr(23)
1842
+ end
1843
+
1844
+ it 'pattern is hh:??:XX' do
1845
+ @at.pattern.should == 'hh:??:XX'
1846
+ end
1847
+
1848
+ it 'has assumed value' do
1849
+ @at.should have_assumed_value
1850
+ end
1851
+
1852
+ it 'assumed value is 10:00:00; 10:00:00' do
1853
+ @at.assumed_value.value.should == '10:00:00'
1854
+ end
1855
+ end
1856
+
1857
+ context '24th attribute hh:??:??; 10:00:00' do
1858
+ before(:all) do
1859
+ @at = attr(24)
1860
+ end
1861
+
1862
+ it 'pattern is hh:??:??' do
1863
+ @at.pattern.should == 'hh:??:??'
1864
+ end
1865
+
1866
+ it 'has assumed value' do
1867
+ @at.should have_assumed_value
1868
+ end
1869
+
1870
+ it 'assumed value is 10:00:00' do
1871
+ @at.assumed_value.value.should == '10:00:00'
1872
+ end
1873
+ end
1874
+
1875
+ context '25th attribute 22:00:05; 10:00:00' do
1876
+ before(:all) do
1877
+ @at = attr(25)
1878
+ end
1879
+
1880
+ it 'the 1st item of list is 22:00:05' do
1881
+ @at.list[0].value.should == '22:00:05'
1882
+ end
1883
+
1884
+ it 'has assumed value' do
1885
+ @at.should have_assumed_value
1886
+ end
1887
+
1888
+ it 'assumed value is 10:00:00' do
1889
+ @at.assumed_value.value.should == '10:00:00'
1890
+ end
1891
+ end
1892
+
1893
+ context '26th attribute 00:00:59; 10:00:00' do
1894
+ before(:all) do
1895
+ @at = attr(26)
1896
+ end
1897
+
1898
+ it 'the 1st item of list is 00:00:59' do
1899
+ @at.list[0].value.should == '00:00:59'
1900
+ end
1901
+
1902
+ it 'has assumed value' do
1903
+ @at.should have_assumed_value
1904
+ end
1905
+
1906
+ it 'assumed value is 10:00:00' do
1907
+ @at.assumed_value.value.should == '10:00:00'
1908
+ end
1909
+ end
1910
+
1911
+ context '27th attribute 12:35; 10:00:00' do
1912
+ before(:all) do
1913
+ @at = attr(27)
1914
+ end
1915
+
1916
+ it 'the 1st item of list is 12:35' do
1917
+ @at.list[0].value.should == '12:35'
1918
+ end
1919
+
1920
+ it 'has assumed value' do
1921
+ @at.should have_assumed_value
1922
+ end
1923
+
1924
+ it 'assumed value is 10:00:00' do
1925
+ @at.assumed_value.value.should == '10:00:00'
1926
+ end
1927
+ end
1928
+
1929
+ context '28th attribute 12:35:45,666; 10:00:00' do
1930
+ before(:all) do
1931
+ @at = attr(28)
1932
+ end
1933
+
1934
+ it 'the 1st item of list is 12:35:45,666' do
1935
+ @at.list[0].value.should == '12:35:45,666'
1936
+ end
1937
+
1938
+ it 'has assumed value' do
1939
+ @at.should have_assumed_value
1940
+ end
1941
+
1942
+ it 'assumed value is 10:00:00' do
1943
+ @at.assumed_value.value.should == '10:00:00'
1944
+ end
1945
+ end
1946
+
1947
+ context '29th attribute 12:35:45-0700; 10:00:00' do
1948
+ before(:all) do
1949
+ @at = attr(29)
1950
+ end
1951
+
1952
+ it 'the 1st item of list is 12:35:45-0700' do
1953
+ @at.list[0].value.should == '12:35:45-0700'
1954
+ end
1955
+
1956
+ it 'has assumed value' do
1957
+ @at.should have_assumed_value
1958
+ end
1959
+
1960
+ it 'assumed value is 10:00:00' do
1961
+ @at.assumed_value.value.should == '10:00:00'
1962
+ end
1963
+ end
1964
+
1965
+ context '30th attribute 12:35:45+0800; 10:00:00' do
1966
+ before(:all) do
1967
+ @at = attr(30)
1968
+ end
1969
+
1970
+ it 'the 1st item of list is 12:35:45+0800' do
1971
+ @at.list[0].value.should == '12:35:45+0800'
1972
+ end
1973
+
1974
+ it 'has assumed value' do
1975
+ @at.should have_assumed_value
1976
+ end
1977
+
1978
+ it 'assumed value is 10:00:00' do
1979
+ @at.assumed_value.value.should == '10:00:00'
1980
+ end
1981
+ end
1982
+
1983
+ context '31st attribute 12:35:45,999-0700; 10:00:00' do
1984
+ before(:all) do
1985
+ @at = attr(31)
1986
+ end
1987
+
1988
+ it 'the 1st item of list is 12:35:45,999-0700' do
1989
+ @at.list[0].value.should == '12:35:45,999-0700'
1990
+ end
1991
+
1992
+ it 'has assumed value' do
1993
+ @at.should have_assumed_value
1994
+ end
1995
+
1996
+ it 'assumed value is 10:00:00' do
1997
+ @at.assumed_value.value.should == '10:00:00'
1998
+ end
1999
+ end
2000
+
2001
+ context '32nd attribute 12:35:45,000+0000; 10:00:00' do
2002
+ before(:all) do
2003
+ @at = attr(32)
2004
+ end
2005
+
2006
+ it 'the 1st item of list is 12:35:45,000+0800' do
2007
+ @at.list[0].value.should == '12:35:45,000+0800'
2008
+ end
2009
+
2010
+ it 'has assumed value' do
2011
+ @at.should have_assumed_value
2012
+ end
2013
+
2014
+ it 'assumed value is 10:00:00' do
2015
+ @at.assumed_value.value.should == '10:00:00'
2016
+ end
2017
+ end
2018
+
2019
+ context '33rd attribute 12:35:45,000Z; 10:00:00' do
2020
+ before(:all) do
2021
+ @at = attr(33)
2022
+ end
2023
+
2024
+ it 'the 1st item of list is 12:35:45,000Z' do
2025
+ @at.list[0].value.should == '12:35:45,000Z'
2026
+ end
2027
+
2028
+ it 'has assumed value' do
2029
+ @at.should have_assumed_value
2030
+ end
2031
+
2032
+ it 'assumed value is 10:00:00' do
2033
+ @at.assumed_value.value.should == '10:00:00'
2034
+ end
2035
+ end
2036
+
2037
+ context '34th attribute 12:35:45,995-0700; 10:00:00' do
2038
+ before(:all) do
2039
+ @at = attr(34)
2040
+ end
2041
+
2042
+ it 'the 1st item of list is 12:35:45,995-0700' do
2043
+ @at.list[0].value.should == '12:35:45,995-0700'
2044
+ end
2045
+
2046
+ it 'has assumed value' do
2047
+ @at.should have_assumed_value
2048
+ end
2049
+
2050
+ it 'assumed value is 10:00:00' do
2051
+ @at.assumed_value.value.should == '10:00:00'
2052
+ end
2053
+ end
2054
+
2055
+ context '35th attribute 12:35:45,001+0800; 10:00:00' do
2056
+ before(:all) do
2057
+ @at = attr(35)
2058
+ end
2059
+
2060
+ it 'the 1st item of list is 12:35:45,001+0800' do
2061
+ @at.list[0].value.should == '12:35:45,001+0800'
2062
+ end
2063
+
2064
+ it 'has assumed value' do
2065
+ @at.should have_assumed_value
2066
+ end
2067
+
2068
+ it 'assumed value is 10:00:00' do
2069
+ @at.assumed_value.value.should == '10:00:00'
2070
+ end
2071
+ end
2072
+
2073
+ context '36th attribute |12:35..16:35|; 10:00:00' do
2074
+ before(:all) do
2075
+ @at = attr(36)
2076
+ end
2077
+
2078
+ it 'lower range is 12:35' do
2079
+ @at.range.lower.value.should == '12:35'
2080
+ end
2081
+
2082
+ it 'upper range is 16:35' do
2083
+ @at.range.upper.value.should == '16:35'
2084
+ end
2085
+
2086
+ it 'has assumed value' do
2087
+ @at.should have_assumed_value
2088
+ end
2089
+
2090
+ it 'assumed value is 10:00:00' do
2091
+ @at.assumed_value.value.should == '10:00:00'
2092
+ end
2093
+ end
2094
+
2095
+ context '37th attribute |< 12:35|; 10:00:00' do
2096
+ before(:all) do
2097
+ @at = attr(37)
2098
+ end
2099
+
2100
+ it 'upper range is 12:35' do
2101
+ @at.range.upper.value.should == '12:35'
2102
+ end
2103
+
2104
+ it 'is not upper included' do
2105
+ @at.range.should_not be_upper_included
2106
+ end
2107
+
2108
+ it 'is lower unbounded' do
2109
+ @at.range.should be_lower_unbounded
2110
+ end
2111
+
2112
+ it 'has assumed value' do
2113
+ @at.should have_assumed_value
2114
+ end
2115
+
2116
+ it 'assumed value is 10:00:00' do
2117
+ @at.assumed_value.value.should == '10:00:00'
2118
+ end
2119
+ end
2120
+
2121
+ context '38th attribute |<= 12:35|; 10:00:00' do
2122
+ before(:all) do
2123
+ @at = attr(38)
2124
+ end
2125
+
2126
+ it 'upper range is 12:35' do
2127
+ @at.range.upper.value.should == '12:35'
2128
+ end
2129
+
2130
+ it 'is upper included' do
2131
+ @at.range.should be_upper_included
2132
+ end
2133
+
2134
+ it 'is lower unbounded' do
2135
+ @at.range.should be_lower_unbounded
2136
+ end
2137
+
2138
+ it 'has assumed value' do
2139
+ @at.should have_assumed_value
2140
+ end
2141
+
2142
+ it 'assumed value is 10:00:00' do
2143
+ @at.assumed_value.value.should == '10:00:00'
2144
+ end
2145
+ end
2146
+
2147
+ context '39th attribute |> 12:35|; 10:00:00' do
2148
+ before(:all) do
2149
+ @at = attr(39)
2150
+ end
2151
+
2152
+ it 'lower range is 12:35' do
2153
+ @at.range.lower.value.should == '12:35'
2154
+ end
2155
+
2156
+ it 'is not lower included' do
2157
+ @at.range.should_not be_lower_included
2158
+ end
2159
+
2160
+ it 'is upper unbounded' do
2161
+ @at.range.should be_upper_unbounded
2162
+ end
2163
+
2164
+ it 'has assumed value' do
2165
+ @at.should have_assumed_value
2166
+ end
2167
+
2168
+ it 'assumed value is 10:00:00' do
2169
+ @at.assumed_value.value.should == '10:00:00'
2170
+ end
2171
+ end
2172
+
2173
+ context '40th attribute |>= 12:35; 10:00:00|' do
2174
+ before(:all) do
2175
+ @at = attr(40)
2176
+ end
2177
+
2178
+ it 'lower range is 12:35' do
2179
+ @at.range.lower.value.should == '12:35'
2180
+ end
2181
+
2182
+ it 'is lower included' do
2183
+ @at.range.should be_lower_included
2184
+ end
2185
+
2186
+ it 'is upper unbounded' do
2187
+ @at.range.should be_upper_unbounded
2188
+ end
2189
+
2190
+ it 'has assumed value' do
2191
+ @at.should have_assumed_value
2192
+ end
2193
+
2194
+ it 'assumed value is 10:00:00' do
2195
+ @at.assumed_value.value.should == '10:00:00'
2196
+ end
2197
+ end
2198
+
2199
+ context '41st attribute |12:35|' do
2200
+ before(:all) do
2201
+ @at = attr(41)
2202
+ end
2203
+
2204
+ it 'lower range is 12:35' do
2205
+ @at.range.lower.value.should == '12:35'
2206
+ end
2207
+
2208
+ it 'upper range is 12:35' do
2209
+ @at.range.upper.value.should == '12:35'
2210
+ end
2211
+
2212
+ it 'is lower included' do
2213
+ @at.range.should be_lower_included
2214
+ end
2215
+
2216
+ it 'is upper included' do
2217
+ @at.range.should be_upper_included
2218
+ end
2219
+
2220
+ it 'does not have assumed value' do
2221
+ @at.should_not have_assumed_value
2222
+ end
2223
+ end
2224
+
2225
+ context '42nd attribute 00:00:59,0' do
2226
+ before(:all) do
2227
+ @at = attr(42)
2228
+ end
2229
+
2230
+ it 'the 1st item of list is 00:00:59,0' do
2231
+ @at.list[0].value.should == '00:00:59,0'
2232
+ end
2233
+
2234
+ it 'does not have assumed value' do
2235
+ @at.should_not have_assumed_value
2236
+ end
2237
+ end
2238
+ end
2239
+
2240
+ context 'DateTime constraint' do
2241
+ before(:all) do
2242
+ @constraints = const(6)
2243
+ end
2244
+
2245
+ context '1st attribute yyyy-mm-dd hh:mm:ss' do
2246
+ before(:all) do
2247
+ @at = attr(1)
2248
+ end
2249
+
2250
+ it 'pattern is yyyy-mm-dd hh:mm:ss' do
2251
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:ss'
2252
+ end
2253
+
2254
+ it 'does not have assumed value' do
2255
+ @at.should_not have_assumed_value
2256
+ end
2257
+ end
2258
+
2259
+ context '2nd attribute yyyy-mm-dd hh:mm:??' do
2260
+ before(:all) do
2261
+ @at = attr(2)
2262
+ end
2263
+
2264
+ it 'pattern is yyyy-mm-dd hh:mm:??' do
2265
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:??'
2266
+ end
2267
+
2268
+ it 'does not have assumed value' do
2269
+ @at.should_not have_assumed_value
2270
+ end
2271
+ end
2272
+
2273
+ context '3rd attribute yyyy-mm-dd hh:mm:XX' do
2274
+ before(:all) do
2275
+ @at = attr(3)
2276
+ end
2277
+
2278
+ it 'pattern is yyyy-mm-dd hh:mm:XX' do
2279
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:XX'
2280
+ end
2281
+
2282
+ it 'does not have assumed value' do
2283
+ @at.should_not have_assumed_value
2284
+ end
2285
+ end
2286
+
2287
+ context '4th attribute yyyy-mm-dd hh:??:XX' do
2288
+ before(:all) do
2289
+ @at = attr(4)
2290
+ end
2291
+
2292
+ it 'pattern is yyyy-mm-dd hh:??:XX' do
2293
+ @at.pattern.should == 'yyyy-mm-dd hh:??:XX'
2294
+ end
2295
+
2296
+ it 'does not have assumed value' do
2297
+ @at.should_not have_assumed_value
2298
+ end
2299
+ end
2300
+
2301
+ context '5th attribute yyyy-??-?? ??:??:??' do
2302
+ before(:all) do
2303
+ @at = attr(5)
2304
+ end
2305
+
2306
+ it 'pattern is yyyy-??-?? ??:??:??' do
2307
+ @at.pattern.should == 'yyyy-??-?? ??:??:??'
2308
+ end
2309
+
2310
+ it 'does not have assumed value' do
2311
+ @at.should_not have_assumed_value
2312
+ end
2313
+ end
2314
+
2315
+ context '6th attribute 1983-12-25T22:00:05' do
2316
+ before(:all) do
2317
+ @at = attr(6)
2318
+ end
2319
+
2320
+ it '1st item of list is 1983-12-25T22:00:05' do
2321
+ @at.list[0].value.should == '1983-12-25T22:00:05'
2322
+ end
2323
+
2324
+ it 'does not have assumed value' do
2325
+ @at.should_not have_assumed_value
2326
+ end
2327
+ end
2328
+
2329
+ context '7th attribute 2000-01-01T00:00:59' do
2330
+ before(:all) do
2331
+ @at = attr(7)
2332
+ end
2333
+
2334
+ it '1st item of list is 2000-01-01T00:00:59' do
2335
+ @at.list[0].value.should == '2000-01-01T00:00:59'
2336
+ end
2337
+
2338
+ it 'does not have assumed value' do
2339
+ @at.should_not have_assumed_value
2340
+ end
2341
+ end
2342
+
2343
+ context '8th attribute 2000-01-01T00:00:59' do
2344
+ before(:all) do
2345
+ @at = attr(8)
2346
+ end
2347
+
2348
+ it '1st item of list is 2000-01-01T00:00:59' do
2349
+ @at.list[0].value.should == '2000-01-01T00:00:59'
2350
+ end
2351
+
2352
+ it 'does not have assumed value' do
2353
+ @at.should_not have_assumed_value
2354
+ end
2355
+ end
2356
+
2357
+ context '9th attribute 2000-01-01T00:00:59,105' do
2358
+ before(:all) do
2359
+ @at = attr(9)
2360
+ end
2361
+
2362
+ it '1st item of list is 2000-01-01T00:00:59,105' do
2363
+ @at.list[0].value.should == '2000-01-01T00:00:59,105'
2364
+ end
2365
+
2366
+ it 'does not have assumed value' do
2367
+ @at.should_not have_assumed_value
2368
+ end
2369
+ end
2370
+
2371
+ context '10th attribute 2000-01-01T00:00:59Z' do
2372
+ before(:all) do
2373
+ @at = attr(10)
2374
+ end
2375
+
2376
+ it '1st item of list is 2000-01-01T00:00:59Z' do
2377
+ @at.list[0].value.should == '2000-01-01T00:00:59Z'
2378
+ end
2379
+
2380
+ it 'does not have assumed value' do
2381
+ @at.should_not have_assumed_value
2382
+ end
2383
+ end
2384
+
2385
+ context '11th attribute 2000-01-01T00:00:59+1200' do
2386
+ before(:all) do
2387
+ @at = attr(11)
2388
+ end
2389
+
2390
+ it '1st item of list is 2000-01-01T00:00:59+1200' do
2391
+ @at.list[0].value.should == '2000-01-01T00:00:59+1200'
2392
+ end
2393
+
2394
+ it 'does not have assumed value' do
2395
+ @at.should_not have_assumed_value
2396
+ end
2397
+ end
2398
+
2399
+ context '12th attribute 2000-01-01T00:00:59,500Z' do
2400
+ before(:all) do
2401
+ @at = attr(12)
2402
+ end
2403
+
2404
+ it '1st item of list is 2000-01-01T00:00:59,500Z' do
2405
+ @at.list[0].value.should == '2000-01-01T00:00:59,500Z'
2406
+ end
2407
+
2408
+ it 'does not have assumed value' do
2409
+ @at.should_not have_assumed_value
2410
+ end
2411
+ end
2412
+
2413
+ context '13th attribute 2000-01-01T00:00:59,500+1200' do
2414
+ before(:all) do
2415
+ @at = attr(13)
2416
+ end
2417
+
2418
+ it '1st item of list is 2000-01-01T00:00:59,500+1200' do
2419
+ @at.list[0].value.should == '2000-01-01T00:00:59,500+1200'
2420
+ end
2421
+
2422
+ it 'does not have assumed value' do
2423
+ @at.should_not have_assumed_value
2424
+ end
2425
+ end
2426
+
2427
+ context '14th attribute 2000-01-01T00:00:59,000Z' do
2428
+ before(:all) do
2429
+ @at = attr(14)
2430
+ end
2431
+
2432
+ it '1st item of list is 2000-01-01T00:00:59,000Z' do
2433
+ @at.list[0].value.should == '2000-01-01T00:00:59,000Z'
2434
+ end
2435
+
2436
+ it 'does not have assumed value' do
2437
+ @at.should_not have_assumed_value
2438
+ end
2439
+ end
2440
+
2441
+ context '15th attribute 2000-01-01T00:00:59,000+1200' do
2442
+ before(:all) do
2443
+ @at = attr(15)
2444
+ end
2445
+
2446
+ it '1st item of list is 2000-01-01T00:00:59,000+1200' do
2447
+ @at.list[0].value.should == '2000-01-01T00:00:59,000+1200'
2448
+ end
2449
+
2450
+ it 'does not have assumed value' do
2451
+ @at.should_not have_assumed_value
2452
+ end
2453
+ end
2454
+
2455
+ context '16th attribute |2000-01-01T00:00:00..2000-01-02T00:00:00|' do
2456
+ before(:all) do
2457
+ @at = attr(16)
2458
+ end
2459
+
2460
+ it 'lower range is 2000-01-01T00:00:00' do
2461
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2462
+ end
2463
+
2464
+ it 'upper range is 2000-01-02T00:00:00' do
2465
+ @at.range.upper.value.should == '2000-01-02T00:00:00'
2466
+ end
2467
+
2468
+ it 'is upper included' do
2469
+ @at.range.should be_upper_included
2470
+ end
2471
+
2472
+ it 'is upper included' do
2473
+ @at.range.should be_upper_included
2474
+ end
2475
+
2476
+ it 'does not have assumed value' do
2477
+ @at.should_not have_assumed_value
2478
+ end
2479
+ end
2480
+
2481
+ context '17th attribute |< 2000-01-01T00:00:00|' do
2482
+ before(:all) do
2483
+ @at = attr(17)
2484
+ end
2485
+
2486
+ it 'upper range is 2000-01-01T00:00:00' do
2487
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
2488
+ end
2489
+
2490
+ it 'is not upper included' do
2491
+ @at.range.should_not be_upper_included
2492
+ end
2493
+
2494
+ it 'is lower unbounded' do
2495
+ @at.range.should be_lower_unbounded
2496
+ end
2497
+
2498
+ it 'does not have assumed value' do
2499
+ @at.should_not have_assumed_value
2500
+ end
2501
+ end
2502
+
2503
+ context '18th attribute |<= 2000-01-01T00:00:00|' do
2504
+ before(:all) do
2505
+ @at = attr(18)
2506
+ end
2507
+
2508
+ it 'upper range is 2000-01-01T00:00:00' do
2509
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
2510
+ end
2511
+
2512
+ it 'is not upper included' do
2513
+ @at.range.should be_upper_included
2514
+ end
2515
+
2516
+ it 'is lower unbounded' do
2517
+ @at.range.should be_lower_unbounded
2518
+ end
2519
+
2520
+ it 'does not have assumed value' do
2521
+ @at.should_not have_assumed_value
2522
+ end
2523
+ end
2524
+
2525
+ context '19th attribute |> 2000-01-01T00:00:00|' do
2526
+ before(:all) do
2527
+ @at = attr(19)
2528
+ end
2529
+
2530
+ it 'lower range is 2000-01-01T00:00:00' do
2531
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2532
+ end
2533
+
2534
+ it 'is not lower included' do
2535
+ @at.range.should_not be_lower_included
2536
+ end
2537
+
2538
+ it 'is upper unbounded' do
2539
+ @at.range.should be_upper_unbounded
2540
+ end
2541
+
2542
+ it 'does not have assumed value' do
2543
+ @at.should_not have_assumed_value
2544
+ end
2545
+ end
2546
+
2547
+ context '20th attribute |>= 2000-01-01T00:00:00|' do
2548
+ before(:all) do
2549
+ @at = attr(20)
2550
+ end
2551
+
2552
+ it 'lower range is 2000-01-01T00:00:00' do
2553
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2554
+ end
2555
+
2556
+ it 'is lower included' do
2557
+ @at.range.should be_lower_included
2558
+ end
2559
+
2560
+ it 'is upper unbounded' do
2561
+ @at.range.should be_upper_unbounded
2562
+ end
2563
+
2564
+ it 'does not have assumed value' do
2565
+ @at.should_not have_assumed_value
2566
+ end
2567
+ end
2568
+
2569
+ context '21st attribute yyyy-mm-dd hh:mm:ss; 2006-03-31T01:12:00|' do
2570
+ before(:all) do
2571
+ @at = attr(21)
2572
+ end
2573
+
2574
+ it 'pattern is yyyy-mm-dd hh:mm:ss' do
2575
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:ss'
2576
+ end
2577
+
2578
+ it 'has assumed value' do
2579
+ @at.should have_assumed_value
2580
+ end
2581
+
2582
+ it 'asssumed value is 2006-03-31T01:12:00' do
2583
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2584
+ end
2585
+ end
2586
+
2587
+ context '22nd attribute yyyy-mm-dd hh:mm:??; 2006-03-31T01:12:00' do
2588
+ before(:all) do
2589
+ @at = attr(22)
2590
+ end
2591
+
2592
+ it 'pattern is yyyy-mm-dd hh:mm:??' do
2593
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:??'
2594
+ end
2595
+
2596
+ it 'asssumed value is 2006-03-31T01:12:00' do
2597
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2598
+ end
2599
+ end
2600
+
2601
+ context '23rd attribute yyyy-mm-dd hh:mm:XX; 2006-03-31T01:12:00' do
2602
+ before(:all) do
2603
+ @at = attr(23)
2604
+ end
2605
+
2606
+ it 'pattern is yyyy-mm-dd hh:mm:XX' do
2607
+ @at.pattern.should == 'yyyy-mm-dd hh:mm:XX'
2608
+ end
2609
+
2610
+ it 'asssumed value is 2006-03-31T01:12:00' do
2611
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2612
+ end
2613
+ end
2614
+
2615
+ context '24th attribute yyyy-mm-dd hh:??:XX; 2006-03-31T01:12:00' do
2616
+ before(:all) do
2617
+ @at = attr(24)
2618
+ end
2619
+
2620
+ it 'pattern is yyyy-mm-dd hh:??:XX' do
2621
+ @at.pattern.should == 'yyyy-mm-dd hh:??:XX'
2622
+ end
2623
+
2624
+ it 'asssumed value is 2006-03-31T01:12:00' do
2625
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2626
+ end
2627
+ end
2628
+
2629
+ context '25th attribute yyyy-??-?? ??:??:??; 2006-03-31T01:12:00' do
2630
+ before(:all) do
2631
+ @at = attr(25)
2632
+ end
2633
+
2634
+ it 'pattern is yyyy-??-?? ??:??:??' do
2635
+ @at.pattern.should == 'yyyy-??-?? ??:??:??'
2636
+ end
2637
+
2638
+ it 'asssumed value is 2006-03-31T01:12:00' do
2639
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2640
+ end
2641
+ end
2642
+
2643
+ context '26th attribute 1983-12-25T22:00:05; 2006-03-31T01:12:00' do
2644
+ before(:all) do
2645
+ @at = attr(26)
2646
+ end
2647
+
2648
+ it '1st item of list is 1983-12-25T22:00:05' do
2649
+ @at.list[0].value.should == '1983-12-25T22:00:05'
2650
+ end
2651
+
2652
+ it 'asssumed value is 2006-03-31T01:12:00' do
2653
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2654
+ end
2655
+ end
2656
+
2657
+ context '27th attribute 2000-01-01T00:00:59; 2006-03-31T01:12:00' do
2658
+ before(:all) do
2659
+ @at = attr(27)
2660
+ end
2661
+
2662
+ it '1st item of list is 2000-01-01T00:00:59' do
2663
+ @at.list[0].value.should == '2000-01-01T00:00:59'
2664
+ end
2665
+
2666
+ it 'asssumed value is 2006-03-31T01:12:00' do
2667
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2668
+ end
2669
+ end
2670
+
2671
+ context '28th attribute 2000-01-01T00:00:59,000; 2006-03-31T01:12:00' do
2672
+ before(:all) do
2673
+ @at = attr(28)
2674
+ end
2675
+
2676
+ it '1st item of list is 2000-01-01T00:00:59,000' do
2677
+ @at.list[0].value.should == '2000-01-01T00:00:59,000'
2678
+ end
2679
+
2680
+ it 'asssumed value is 2006-03-31T01:12:00' do
2681
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2682
+ end
2683
+ end
2684
+
2685
+ context '29th attribute 2000-01-01T00:00:59,105; 2006-03-31T01:12:00' do
2686
+ before(:all) do
2687
+ @at = attr(29)
2688
+ end
2689
+
2690
+ it '1st item of list is 2000-01-01T00:00:59,105' do
2691
+ @at.list[0].value.should == '2000-01-01T00:00:59,105'
2692
+ end
2693
+
2694
+ it 'asssumed value is 2006-03-31T01:12:00' do
2695
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2696
+ end
2697
+ end
2698
+
2699
+ context '30th attribute 2000-01-01T00:00:59Z; 2006-03-31T01:12:00' do
2700
+ before(:all) do
2701
+ @at = attr(30)
2702
+ end
2703
+
2704
+ it '1st item of list is 2000-01-01T00:00:59Z' do
2705
+ @at.list[0].value.should == '2000-01-01T00:00:59Z'
2706
+ end
2707
+
2708
+ it 'asssumed value is 2006-03-31T01:12:00' do
2709
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2710
+ end
2711
+ end
2712
+
2713
+ context '31st attribute 2000-01-01T00:00:59+1200; 2006-03-31T01:12:00' do
2714
+ before(:all) do
2715
+ @at = attr(31)
2716
+ end
2717
+
2718
+ it '1st item of list is 2000-01-01T00:00:59+1200' do
2719
+ @at.list[0].value.should == '2000-01-01T00:00:59+1200'
2720
+ end
2721
+
2722
+ it 'asssumed value is 2006-03-31T01:12:00' do
2723
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2724
+ end
2725
+ end
2726
+
2727
+ context '32nd attribute 2000-01-01T00:00:59,500Z; 2006-03-31T01:12:00' do
2728
+ before(:all) do
2729
+ @at = attr(32)
2730
+ end
2731
+
2732
+ it '1st item of list is 2000-01-01T00:00:59,500Z' do
2733
+ @at.list[0].value.should == '2000-01-01T00:00:59,500Z'
2734
+ end
2735
+
2736
+ it 'asssumed value is 2006-03-31T01:12:00' do
2737
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2738
+ end
2739
+ end
2740
+
2741
+ context '33rd attribute 2000-01-01T00:00:59,500+1200; 2006-03-31T01:12:00' do
2742
+ before(:all) do
2743
+ @at = attr(33)
2744
+ end
2745
+
2746
+ it '1st item of list is 2000-01-01T00:00:59,500+1200' do
2747
+ @at.list[0].value.should == '2000-01-01T00:00:59,500+1200'
2748
+ end
2749
+
2750
+ it 'asssumed value is 2006-03-31T01:12:00' do
2751
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2752
+ end
2753
+ end
2754
+
2755
+ context '34th attribute 2000-01-01T00:00:59,000Z; 2006-03-31T01:12:00' do
2756
+ before(:all) do
2757
+ @at = attr(34)
2758
+ end
2759
+
2760
+ it '1st item of list is 2000-01-01T00:00:59,000Z' do
2761
+ @at.list[0].value.should == '2000-01-01T00:00:59,000Z'
2762
+ end
2763
+
2764
+ it 'asssumed value is 2006-03-31T01:12:00' do
2765
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2766
+ end
2767
+ end
2768
+
2769
+ context '35th attribute 2000-01-01T00:00:59,000+1200; 2006-03-31T01:12:00' do
2770
+ before(:all) do
2771
+ @at = attr(35)
2772
+ end
2773
+
2774
+ it '1st item of list is 2000-01-01T00:00:59,000+1200' do
2775
+ @at.list[0].value.should == '2000-01-01T00:00:59,000+1200'
2776
+ end
2777
+
2778
+ it 'asssumed value is 2006-03-31T01:12:00' do
2779
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2780
+ end
2781
+ end
2782
+
2783
+ context '36th attribute |2000-01-01T00:00:00..2000-01-02T00:00:00|; 2006-03-31T01:12:00' do
2784
+ before(:all) do
2785
+ @at = attr(36)
2786
+ end
2787
+
2788
+ it 'lower range is 2000-01-01T00:00:00' do
2789
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2790
+ end
2791
+
2792
+ it 'upper range is 2000-01-02T00:00:00' do
2793
+ @at.range.upper.value.should == '2000-01-02T00:00:00'
2794
+ end
2795
+
2796
+ it 'asssumed value is 2006-03-31T01:12:00' do
2797
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2798
+ end
2799
+ end
2800
+
2801
+ context '37th attribute |< 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
2802
+ before(:all) do
2803
+ @at = attr(37)
2804
+ end
2805
+
2806
+ it 'upper range is 2000-01-01T00:00:00' do
2807
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
2808
+ end
2809
+
2810
+ it 'is not upper included' do
2811
+ @at.range.should_not be_upper_included
2812
+ end
2813
+
2814
+ it 'is lower unbounded' do
2815
+ @at.range.should be_lower_unbounded
2816
+ end
2817
+
2818
+ it 'asssumed value is 2006-03-31T01:12:00' do
2819
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2820
+ end
2821
+ end
2822
+
2823
+ context '38th attribute |<= 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
2824
+ before(:all) do
2825
+ @at = attr(38)
2826
+ end
2827
+
2828
+ it 'upper range is 2000-01-01T00:00:00' do
2829
+ @at.range.upper.value.should == '2000-01-01T00:00:00'
2830
+ end
2831
+
2832
+ it 'is not upper included' do
2833
+ @at.range.should be_upper_included
2834
+ end
2835
+
2836
+ it 'is lower unbounded' do
2837
+ @at.range.should be_lower_unbounded
2838
+ end
2839
+
2840
+ it 'asssumed value is 2006-03-31T01:12:00' do
2841
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2842
+ end
2843
+ end
2844
+
2845
+ context '39th attribute |> 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
2846
+ before(:all) do
2847
+ @at = attr(39)
2848
+ end
2849
+
2850
+ it 'lower range is 2000-01-01T00:00:00' do
2851
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2852
+ end
2853
+
2854
+ it 'is not lower included' do
2855
+ @at.range.should_not be_lower_included
2856
+ end
2857
+
2858
+ it 'is upper unbounded' do
2859
+ @at.range.should be_upper_unbounded
2860
+ end
2861
+
2862
+ it 'asssumed value is 2006-03-31T01:12:00' do
2863
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2864
+ end
2865
+ end
2866
+
2867
+ context '40th attribute |>= 2000-01-01T00:00:00|; 2006-03-31T01:12:00' do
2868
+ before(:all) do
2869
+ @at = attr(40)
2870
+ end
2871
+
2872
+ it 'lower range is 2000-01-01T00:00:00' do
2873
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2874
+ end
2875
+
2876
+ it 'is lower included' do
2877
+ @at.range.should be_lower_included
2878
+ end
2879
+
2880
+ it 'is upper unbounded' do
2881
+ @at.range.should be_upper_unbounded
2882
+ end
2883
+
2884
+ it 'asssumed value is 2006-03-31T01:12:00' do
2885
+ @at.assumed_value.value.should == '2006-03-31T01:12:00'
2886
+ end
2887
+ end
2888
+
2889
+ context '41th attribute yyyy-??-??T??:??:??' do
2890
+ before(:all) do
2891
+ @at = attr(41)
2892
+ end
2893
+
2894
+ it 'pattern is yyyy-??-??T??:??:??' do
2895
+ @at.pattern.should == 'yyyy-??-??T??:??:??'
2896
+ end
2897
+ end
2898
+
2899
+ context '42th attribute |2000-01-01T00:00:00|' do
2900
+ before(:all) do
2901
+ @at = attr(36)
2902
+ end
2903
+
2904
+ it 'lower range is 2000-01-01T00:00:00' do
2905
+ @at.range.lower.value.should == '2000-01-01T00:00:00'
2906
+ end
2907
+
2908
+ it 'upper range is 2000-01-02T00:00:00' do
2909
+ @at.range.upper.value.should == '2000-01-02T00:00:00'
2910
+ end
2911
+
2912
+ it 'is upper included' do
2913
+ @at.range.should be_upper_included
2914
+ end
2915
+
2916
+ it 'is upper included' do
2917
+ @at.range.should be_upper_included
2918
+ end
2919
+ end
2920
+ end
2921
+ end
2922
+ end