adiwg-mdtranslator 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/Rakefile +1 -2
- data/adiwg-mdtranslator.gemspec +23 -23
- data/bin/mdtranslator +187 -155
- data/lib/adiwg/mdtranslator.rb +63 -38
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +123 -5
- data/lib/adiwg/mdtranslator/internal/module_coordinates.rb +55 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +98 -70
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb +13 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_additionalDocumentation.rb +13 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_address.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_associatedResource.rb +22 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_boundingBox.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_browseGraphic.rb +11 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_citation.rb +28 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_classedData.rb +49 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_classedDataItem.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_contacts.rb +14 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_coverageInfo.rb +83 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_coverageItem.rb +136 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dataDictionary.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dataQuality.rb +17 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dateTime.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_descriptiveKeyword.rb +22 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dictionaryInfo.rb +18 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_digitalTransferOption.rb +80 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_dimension.rb +81 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_distributionInfo.rb +89 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_distributionOrder.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_domain.rb +24 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_domainItem.rb +23 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entity.rb +26 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityAttribute.rb +24 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityForeignKey.rb +20 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityIndex.rb +20 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_extent.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geoCoordSystem.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geoProperties.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geographicElement.rb +20 -18
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_gridInfo.rb +67 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_imageInfo.rb +119 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_legalConstraint.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_lineString.rb +5 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_lineage.rb +11 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_locale.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_mdJson.rb +10 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_medium.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadata.rb +14 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadataExtension.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadataInfo.rb +35 -15
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_onlineResource.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_phone.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_point.rb +5 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_polygon.rb +5 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_processStep.rb +19 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resolution.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceFormat.rb +12 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceIdentifier.rb +30 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceInfo.rb +70 -33
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceMaintenance.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceSpecificUsage.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_responsibleParty.rb +10 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_securityConstraint.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_sensorInfo.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_source.rb +11 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_spatialReference.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_taxonClass.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_taxonomy.rb +11 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_temporalElement.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_timeInstant.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_timePeriod.rb +6 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_verticalElement.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_voucher.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/version.rb +19 -0
- data/lib/adiwg/mdtranslator/readers/mdReaders.rb +21 -18
- data/lib/adiwg/mdtranslator/version.rb +15 -1
- data/lib/adiwg/mdtranslator/writers/html/html_writer.rb +11 -8
- data/lib/adiwg/mdtranslator/writers/html/md_html_writer.rb +21 -18
- data/lib/adiwg/mdtranslator/writers/html/sections/html_additionalDocumentation.rb +48 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_associatedResource.rb +73 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +84 -135
- data/lib/adiwg/mdtranslator/writers/html/sections/html_citation.rb +18 -8
- data/lib/adiwg/mdtranslator/writers/html/sections/html_classedData.rb +50 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_classedDataItem.rb +50 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_contact.rb +5 -9
- data/lib/adiwg/mdtranslator/writers/html/sections/html_coverageInfo.rb +88 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_coverageItem.rb +139 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataDictionary.rb +13 -12
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataLineage.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataSource.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dimension.rb +71 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_distributor.rb +62 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_domain.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_entity.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_extent.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_format.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicElement.rb +7 -7
- data/lib/adiwg/mdtranslator/writers/html/sections/html_gridInfo.rb +65 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_head.rb +18 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_imageInfo.rb +120 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_inlineCss.css +13 -20
- data/lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_medium.rb +19 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb +22 -9
- data/lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceContact.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceGeneral.rb +25 -14
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceId.rb +30 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +194 -129
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceMaint.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceOther.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_responsibleParty.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_sensorInfo.rb +66 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_temporalElement.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_timeInstant.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_timePeriod.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_transferOption.rb +29 -4
- data/lib/adiwg/mdtranslator/writers/html/version.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/class_FCfeatureCatalogue.rb +17 -16
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_address.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb +42 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_codelist.rb +8 -3
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_contact.rb +16 -25
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_conventionalUnit.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb +39 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_derivedUnit.rb +46 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureAttribute.rb +17 -14
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureConstraint.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureType.rb +16 -12
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_listedValue.rb +9 -18
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_multiplicity.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_onlineResource.rb +13 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_responsibleParty.rb +16 -12
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_telephone.rb +9 -5
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_unitsOfMeasure.rb +262 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +36 -16
- data/lib/adiwg/mdtranslator/writers/iso19110/version.rb +14 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/class_MImetadata.rb +73 -37
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_address.rb +116 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_aggregateInformation.rb +13 -9
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_band.rb +165 -0
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_baseUnit.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_boundingPolygon.rb +14 -10
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_browseGraphic.rb +9 -5
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_citation.rb +31 -16
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_codelist.rb +56 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contact.rb +87 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contentInfo.rb +111 -0
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_conventionalUnit.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_dataIdentification.rb +106 -59
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_dataQuality.rb +11 -7
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_date.rb +8 -5
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_definitionUnit.rb +7 -7
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_derivedUnit.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_digitalTransferOptions.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dimension.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_distribution.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_distributor.rb +44 -22
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_enumerationList.rb +7 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_extent.rb +18 -14
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_format.rb +18 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicBoundingBox.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicDescription.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicElement.rb +10 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_gridInfo.rb +80 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_identifier.rb +10 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_imageDescription.rb +157 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_keyword.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_legalConstraints.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_lineString.rb +13 -10
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_lineage.rb +14 -10
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_locale.rb +67 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_maintenanceInformation.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_medium.rb +30 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_metadataExtension.rb +19 -15
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_multiGeometry.rb +22 -17
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb +94 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_point.rb +12 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_polygon.rb +14 -11
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_processStep.rb +12 -9
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_rangeElementDescription.rb +88 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +52 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_resolution.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_resourceIdentifier.rb +94 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +106 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_securityConstraints.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_source.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_standardOrderProcess.rb +11 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_taxonClassification.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_taxonSystem.rb +18 -14
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_telephone.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_temporalExtent.rb +10 -6
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_timeInstant.rb +9 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_timePeriod.rb +10 -8
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_unitsOfMeasure.rb +48 -25
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_usage.rb +11 -7
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_useConstraints.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_verticalExtent.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_vouchers.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +32 -19
- data/lib/adiwg/mdtranslator/writers/iso19115_2/version.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/mdWriters.rb +21 -24
- data/test/readers/mdJson/v1/tc_reader_mdjson_additionalDocumentation.rb +116 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_address.rb +111 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_associatedResource.rb +157 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_browseGraphic.rb +119 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_citation.rb +143 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_contact.rb +138 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_dataQuality.rb +111 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_dateTime.rb +159 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_descriptiveKeyword.rb +115 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_dictionaryInfo.rb +121 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_digitalTransferOption.rb +94 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_distributionOrder.rb +103 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_domain.rb +130 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_domainItem.rb +98 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entity.rb +134 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entityAttribute.rb +154 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entityForeignKey.rb +100 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entityIndex.rb +99 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_legalConstraint.rb +104 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_lineage.rb +117 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_medium.rb +98 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_metadataInfo.rb +141 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_onlineResource.rb +110 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_phone.rb +112 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_processStep.rb +118 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_resolution.rb +77 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_source.rb +117 -0
- data/test/readers/mdJson/v1/tc_translation_19110.rb +57 -0
- data/test/readers/mdJson/{v1_0/tc_translation.rb → v1/tc_translation_19115_2.rb} +16 -31
- data/test/writers/iso19115_2/tc_writer_iso19115_2_address.rb +22 -15
- metadata +219 -140
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_coordinates.rb +0 -63
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_distributionInfo.rb +0 -161
- data/lib/adiwg/mdtranslator/writers/html/sections/logo150.txt +0 -25
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_digitalTransferOptions.rb +0 -62
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_genericMetaData.rb +0 -74
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceIdentifier.rb +0 -53
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceSystem.rb +0 -40
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_additionalDocumentation.rb +0 -85
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_address.rb +0 -100
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_associatedResource.rb +0 -101
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_browseGraphic.rb +0 -86
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_citation.rb +0 -116
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_contact.rb +0 -138
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_dictionaryInfo.rb +0 -95
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_domain.rb +0 -99
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_onlineResource.rb +0 -92
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_phone.rb +0 -110
@@ -1,138 +0,0 @@
|
|
1
|
-
# MdTranslator - minitest of
|
2
|
-
# reader / mdJson / module_contacts
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2014-12-19 original script
|
6
|
-
|
7
|
-
#set globals used in testing
|
8
|
-
#set globals used by mdJson_reader.rb before requiring module
|
9
|
-
$response = {
|
10
|
-
readerVersionUsed: '1.0',
|
11
|
-
readerExecutionPas: true,
|
12
|
-
readerExecutionMessages: []
|
13
|
-
}
|
14
|
-
|
15
|
-
require 'minitest/autorun'
|
16
|
-
require 'json'
|
17
|
-
require 'adiwg/mdtranslator/internal/internal_metadata_obj'
|
18
|
-
require 'adiwg/mdtranslator/readers/mdJson/mdJson_reader'
|
19
|
-
$ReaderNS = ADIWG::Mdtranslator::Readers::MdJson
|
20
|
-
require 'adiwg/mdtranslator/readers/mdJson/modules_1.0/module_contacts'
|
21
|
-
|
22
|
-
class TestReaderMdJsonContact_v1_0 < MiniTest::Test
|
23
|
-
|
24
|
-
# get json test example
|
25
|
-
file = File.open('test/schemas/v1_0/examples/contact.json', 'r')
|
26
|
-
jsonFile = file.read
|
27
|
-
file.close
|
28
|
-
aIn = JSON.parse(jsonFile)
|
29
|
-
@@hIn = aIn[0]
|
30
|
-
|
31
|
-
# set namespace
|
32
|
-
@@NameSpace = ADIWG::Mdtranslator::Readers::MdJson::Contact
|
33
|
-
|
34
|
-
def test_complete_contact_object
|
35
|
-
|
36
|
-
hIn = @@hIn.clone
|
37
|
-
hIn.delete('phoneBook')
|
38
|
-
hIn.delete('address')
|
39
|
-
hIn.delete('onlineResource')
|
40
|
-
|
41
|
-
intObj = {
|
42
|
-
contactId: 'contactId',
|
43
|
-
indName: 'individualName',
|
44
|
-
orgName: 'organizationName',
|
45
|
-
position: 'positionName',
|
46
|
-
phones: [],
|
47
|
-
address: {},
|
48
|
-
onlineRes: [],
|
49
|
-
contactInstructions: 'contactInstructions'
|
50
|
-
}
|
51
|
-
|
52
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_empty_contact_elements
|
57
|
-
|
58
|
-
hIn = @@hIn.clone
|
59
|
-
hIn['individualName'] = ''
|
60
|
-
hIn['organizationName'] = ''
|
61
|
-
hIn['positionName'] = ''
|
62
|
-
hIn['onlineResource'] = []
|
63
|
-
hIn['contactInstructions'] = ''
|
64
|
-
hIn['phoneBook'] = []
|
65
|
-
hIn['address'] = {}
|
66
|
-
|
67
|
-
intObj = {
|
68
|
-
contactId: 'contactId',
|
69
|
-
indName: nil,
|
70
|
-
orgName: nil,
|
71
|
-
position: nil,
|
72
|
-
phones: [],
|
73
|
-
address: {},
|
74
|
-
onlineRes: [],
|
75
|
-
contactInstructions: nil
|
76
|
-
}
|
77
|
-
|
78
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
def test_missing_contact_elements
|
83
|
-
|
84
|
-
hIn = @@hIn.clone
|
85
|
-
hIn.delete('individualName')
|
86
|
-
hIn.delete('organizationName')
|
87
|
-
hIn.delete('positionName')
|
88
|
-
hIn.delete('onlineResource')
|
89
|
-
hIn.delete('contactInstructions')
|
90
|
-
hIn.delete('phoneBook')
|
91
|
-
hIn.delete('address')
|
92
|
-
|
93
|
-
intObj = {
|
94
|
-
contactId: 'contactId',
|
95
|
-
indName: nil,
|
96
|
-
orgName: nil,
|
97
|
-
position: nil,
|
98
|
-
phones: [],
|
99
|
-
address: {},
|
100
|
-
onlineRes: [],
|
101
|
-
contactInstructions: nil
|
102
|
-
}
|
103
|
-
|
104
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
105
|
-
|
106
|
-
end
|
107
|
-
|
108
|
-
def test_missing_contact_id
|
109
|
-
|
110
|
-
hIn = @@hIn.clone
|
111
|
-
hIn.delete('contactId')
|
112
|
-
|
113
|
-
intObj = nil
|
114
|
-
|
115
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
116
|
-
|
117
|
-
end
|
118
|
-
|
119
|
-
def test_blank_contact_id
|
120
|
-
|
121
|
-
hIn = @@hIn.clone
|
122
|
-
hIn['contactId'] = ''
|
123
|
-
|
124
|
-
intObj = nil
|
125
|
-
|
126
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
127
|
-
|
128
|
-
end
|
129
|
-
|
130
|
-
def test_empty_contact_object
|
131
|
-
|
132
|
-
hIn = {}
|
133
|
-
|
134
|
-
assert_equal nil, @@NameSpace.unpack(hIn)
|
135
|
-
|
136
|
-
end
|
137
|
-
|
138
|
-
end
|
@@ -1,95 +0,0 @@
|
|
1
|
-
# MdTranslator - minitest of
|
2
|
-
# reader / mdJson / module_dictionaryInfo
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2015-01-20 original script
|
6
|
-
|
7
|
-
#set globals used in testing
|
8
|
-
#set globals used by mdJson_reader.rb before requiring module
|
9
|
-
$response = {
|
10
|
-
readerVersionUsed: '1.0',
|
11
|
-
readerExecutionPas: true,
|
12
|
-
readerExecutionMessages: []
|
13
|
-
}
|
14
|
-
|
15
|
-
require 'minitest/autorun'
|
16
|
-
require 'json'
|
17
|
-
require 'adiwg/mdtranslator/internal/internal_metadata_obj'
|
18
|
-
require 'adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dictionaryInfo'
|
19
|
-
|
20
|
-
class TestReaderMdJsonDictionaryInfo_v1_0 < MiniTest::Test
|
21
|
-
|
22
|
-
# get json test example
|
23
|
-
file = File.open('test/schemas/v1_0/examples/dataDictionary.json', 'r')
|
24
|
-
jsonFile = file.read
|
25
|
-
file.close
|
26
|
-
aIn = JSON.parse(jsonFile)
|
27
|
-
@@hIn = aIn[0]['dictionaryInfo']
|
28
|
-
|
29
|
-
# set namespace
|
30
|
-
@@NameSpace = ADIWG::Mdtranslator::Readers::MdJson::DictionaryInfo
|
31
|
-
|
32
|
-
def test_complete_dictionaryInfo_object
|
33
|
-
|
34
|
-
|
35
|
-
hIn = @@hIn.clone
|
36
|
-
hIn.delete('citation')
|
37
|
-
intObj = {
|
38
|
-
dictCitation: {},
|
39
|
-
dictDescription: 'description',
|
40
|
-
dictResourceType: 'resourceType',
|
41
|
-
dictLanguage: 'language'
|
42
|
-
}
|
43
|
-
|
44
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_empty_dictionaryInfo_elements
|
49
|
-
|
50
|
-
hIn = @@hIn.clone
|
51
|
-
hIn['citation'] = {}
|
52
|
-
hIn['description'] = ''
|
53
|
-
hIn['resourceType'] = ''
|
54
|
-
hIn['language'] = ''
|
55
|
-
|
56
|
-
intObj = {
|
57
|
-
dictCitation: {},
|
58
|
-
dictDescription: nil,
|
59
|
-
dictResourceType: nil,
|
60
|
-
dictLanguage: nil
|
61
|
-
}
|
62
|
-
|
63
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_missing_dictionaryInfo_elements
|
68
|
-
|
69
|
-
# except for citation
|
70
|
-
hIn = @@hIn.clone
|
71
|
-
hIn['citation'] = {}
|
72
|
-
hIn.delete('description')
|
73
|
-
hIn.delete('resourceType')
|
74
|
-
hIn.delete('language')
|
75
|
-
|
76
|
-
intObj = {
|
77
|
-
dictCitation: {},
|
78
|
-
dictDescription: nil,
|
79
|
-
dictResourceType: nil,
|
80
|
-
dictLanguage: nil
|
81
|
-
}
|
82
|
-
|
83
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
84
|
-
|
85
|
-
end
|
86
|
-
|
87
|
-
def test_empty_dictionaryInfo_object
|
88
|
-
|
89
|
-
hIn = {}
|
90
|
-
|
91
|
-
assert_equal nil, @@NameSpace.unpack(hIn)
|
92
|
-
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
@@ -1,99 +0,0 @@
|
|
1
|
-
# MdTranslator - minitest of
|
2
|
-
# reader / mdJson / module_domain
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2015-01-20 original script
|
6
|
-
|
7
|
-
#set globals used in testing
|
8
|
-
#set globals used by mdJson_reader.rb before requiring module
|
9
|
-
$response = {
|
10
|
-
readerVersionUsed: '1.0',
|
11
|
-
readerExecutionPas: true,
|
12
|
-
readerExecutionMessages: []
|
13
|
-
}
|
14
|
-
|
15
|
-
require 'minitest/autorun'
|
16
|
-
require 'json'
|
17
|
-
require 'adiwg/mdtranslator/internal/internal_metadata_obj'
|
18
|
-
require 'adiwg/mdtranslator/readers/mdJson/modules_1.0/module_domain'
|
19
|
-
|
20
|
-
class TestReaderMdJsonDomain_v1_0 < MiniTest::Test
|
21
|
-
|
22
|
-
# get json test example
|
23
|
-
file = File.open('test/schemas/v1_0/examples/dataDictionary.json', 'r')
|
24
|
-
jsonFile = file.read
|
25
|
-
file.close
|
26
|
-
aIn = JSON.parse(jsonFile)
|
27
|
-
@@hIn = aIn[0]['domain'][0]
|
28
|
-
|
29
|
-
# set namespace
|
30
|
-
@@NameSpace = ADIWG::Mdtranslator::Readers::MdJson::Domain
|
31
|
-
|
32
|
-
def test_complete_domain_object
|
33
|
-
|
34
|
-
|
35
|
-
hIn = @@hIn.clone
|
36
|
-
hIn.delete('member')
|
37
|
-
intObj = {
|
38
|
-
domainId: 'domainId1',
|
39
|
-
domainName: 'commonName1',
|
40
|
-
domainCode: 'codeName1',
|
41
|
-
domainDescription: 'description1',
|
42
|
-
domainItems: []
|
43
|
-
}
|
44
|
-
|
45
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
def test_empty_domain_elements
|
50
|
-
|
51
|
-
hIn = @@hIn.clone
|
52
|
-
hIn['domainId'] = ''
|
53
|
-
hIn['commonName'] = ''
|
54
|
-
hIn['codeName'] = ''
|
55
|
-
hIn['description'] = ''
|
56
|
-
hIn['member'] = []
|
57
|
-
|
58
|
-
intObj = {
|
59
|
-
domainId: nil,
|
60
|
-
domainName: nil,
|
61
|
-
domainCode: nil,
|
62
|
-
domainDescription: nil,
|
63
|
-
domainItems: []
|
64
|
-
}
|
65
|
-
|
66
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
def test_missing_domain_elements
|
71
|
-
|
72
|
-
# except for domainId
|
73
|
-
hIn = @@hIn.clone
|
74
|
-
hIn.delete('commonName')
|
75
|
-
hIn.delete('codeName')
|
76
|
-
hIn.delete('description')
|
77
|
-
hIn.delete('member')
|
78
|
-
|
79
|
-
intObj = {
|
80
|
-
domainId: 'domainId1',
|
81
|
-
domainName: nil,
|
82
|
-
domainCode: nil,
|
83
|
-
domainDescription: nil,
|
84
|
-
domainItems: []
|
85
|
-
}
|
86
|
-
|
87
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
88
|
-
|
89
|
-
end
|
90
|
-
|
91
|
-
def test_empty_domain_object
|
92
|
-
|
93
|
-
hIn = {}
|
94
|
-
|
95
|
-
assert_equal nil, @@NameSpace.unpack(hIn)
|
96
|
-
|
97
|
-
end
|
98
|
-
|
99
|
-
end
|
@@ -1,92 +0,0 @@
|
|
1
|
-
# MdTranslator - minitest of
|
2
|
-
# reader / mdJson / module_onlineResource
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2014-12-09 original script
|
6
|
-
# Stan Smith 2014-12-15 modified to use namespaces added to mdTranslator
|
7
|
-
|
8
|
-
require 'minitest/autorun'
|
9
|
-
require 'json'
|
10
|
-
require 'adiwg/mdtranslator/internal/internal_metadata_obj'
|
11
|
-
require 'adiwg/mdtranslator/readers/mdJson/modules_1.0/module_onlineResource'
|
12
|
-
|
13
|
-
class TestReaderMdJsonOnlineResource_v1_0 < MiniTest::Test
|
14
|
-
|
15
|
-
# get json test example
|
16
|
-
file = File.open('test/schemas/v1_0/examples/onlineResource.json', 'r')
|
17
|
-
jsonFile = file.read
|
18
|
-
file.close
|
19
|
-
aIn = JSON.parse(jsonFile)
|
20
|
-
@@hIn = aIn[0]
|
21
|
-
|
22
|
-
# set namespace
|
23
|
-
@@NameSpace = ADIWG::Mdtranslator::Readers::MdJson::OnlineResource
|
24
|
-
|
25
|
-
def test_complete_onlineResource_object
|
26
|
-
|
27
|
-
hIn = @@hIn.clone
|
28
|
-
|
29
|
-
intObj = {
|
30
|
-
olResURI: 'http://thisisanexample.com',
|
31
|
-
olResProtocol: 'protocol',
|
32
|
-
olResName: 'name',
|
33
|
-
olResDesc: 'description',
|
34
|
-
olResFunction: 'function'
|
35
|
-
}
|
36
|
-
|
37
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_missing_onlineResource_elements
|
42
|
-
|
43
|
-
# except for uri
|
44
|
-
|
45
|
-
hIn = @@hIn.clone
|
46
|
-
hIn.delete('protocol')
|
47
|
-
hIn.delete('name')
|
48
|
-
hIn.delete('description')
|
49
|
-
hIn.delete('function')
|
50
|
-
|
51
|
-
intObj = {
|
52
|
-
olResURI: 'http://thisisanexample.com',
|
53
|
-
olResProtocol: nil,
|
54
|
-
olResName: nil,
|
55
|
-
olResDesc: nil,
|
56
|
-
olResFunction: nil
|
57
|
-
}
|
58
|
-
|
59
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_empty_onlineResource_elements
|
64
|
-
|
65
|
-
hIn = @@hIn.clone
|
66
|
-
hIn['uri'] = ''
|
67
|
-
hIn['protocol'] = ''
|
68
|
-
hIn['name'] = ''
|
69
|
-
hIn['description'] = ''
|
70
|
-
hIn['function'] = ''
|
71
|
-
|
72
|
-
intObj = {
|
73
|
-
olResURI: nil,
|
74
|
-
olResProtocol: nil,
|
75
|
-
olResName: nil,
|
76
|
-
olResDesc: nil,
|
77
|
-
olResFunction: nil
|
78
|
-
}
|
79
|
-
|
80
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
81
|
-
|
82
|
-
end
|
83
|
-
|
84
|
-
def test_empty_onlineResource_object
|
85
|
-
|
86
|
-
hIn = {}
|
87
|
-
|
88
|
-
assert_equal nil, @@NameSpace.unpack(hIn)
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
|
-
end
|
@@ -1,110 +0,0 @@
|
|
1
|
-
# MdTranslator - minitest of
|
2
|
-
# reader / mdJson / module_phone
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2014-12-09 original script
|
6
|
-
# Stan Smith 2014-12-15 modified to use namespaces added to mdTranslator
|
7
|
-
|
8
|
-
require 'minitest/autorun'
|
9
|
-
require 'json'
|
10
|
-
require 'adiwg/mdtranslator/internal/internal_metadata_obj'
|
11
|
-
require 'adiwg/mdtranslator/readers/mdJson/modules_1.0/module_phone'
|
12
|
-
|
13
|
-
class TestReaderMdJsonPhone_v1_0 < MiniTest::Test
|
14
|
-
|
15
|
-
# get json test example
|
16
|
-
file = File.open('test/schemas/v1_0/examples/contact.json', 'r')
|
17
|
-
jsonFile = file.read
|
18
|
-
file.close
|
19
|
-
aIn = JSON.parse(jsonFile)
|
20
|
-
@@hIn = aIn[0]['phoneBook'][0]
|
21
|
-
|
22
|
-
# set namespace
|
23
|
-
@@NameSpace = ADIWG::Mdtranslator::Readers::MdJson::Phone
|
24
|
-
|
25
|
-
def test_complete_phone_object
|
26
|
-
|
27
|
-
|
28
|
-
hIn = @@hIn.clone
|
29
|
-
intObj = []
|
30
|
-
intObj << {
|
31
|
-
phoneServiceType: 'service11',
|
32
|
-
phoneName: 'phoneName1',
|
33
|
-
phoneNumber: '111-111-1111'
|
34
|
-
}
|
35
|
-
intObj << {
|
36
|
-
phoneServiceType: 'service12',
|
37
|
-
phoneName: 'phoneName1',
|
38
|
-
phoneNumber: '111-111-1111'
|
39
|
-
}
|
40
|
-
|
41
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_missing_phone_service
|
46
|
-
|
47
|
-
hIn = @@hIn.clone
|
48
|
-
hIn.delete('service')
|
49
|
-
|
50
|
-
intObj = []
|
51
|
-
intObj << {
|
52
|
-
phoneServiceType: 'voice',
|
53
|
-
phoneName: 'phoneName1',
|
54
|
-
phoneNumber: '111-111-1111'
|
55
|
-
}
|
56
|
-
|
57
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
58
|
-
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_empty_phone_service
|
62
|
-
|
63
|
-
hIn = @@hIn.clone
|
64
|
-
hIn['service'] = ''
|
65
|
-
|
66
|
-
intObj = []
|
67
|
-
intObj << {
|
68
|
-
phoneServiceType: 'voice',
|
69
|
-
phoneName: 'phoneName1',
|
70
|
-
phoneNumber: '111-111-1111'
|
71
|
-
}
|
72
|
-
|
73
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
def test_missing_phone_number
|
78
|
-
|
79
|
-
# missing phone number should return empty object
|
80
|
-
hIn = @@hIn.clone
|
81
|
-
hIn.delete('phoneNumber')
|
82
|
-
|
83
|
-
intObj = []
|
84
|
-
|
85
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
86
|
-
|
87
|
-
end
|
88
|
-
|
89
|
-
def test_empty_phone_number
|
90
|
-
|
91
|
-
# empty phone number should return empty object
|
92
|
-
hIn = @@hIn.clone
|
93
|
-
hIn['phoneNumber'] = ''
|
94
|
-
|
95
|
-
intObj = []
|
96
|
-
|
97
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
98
|
-
|
99
|
-
end
|
100
|
-
|
101
|
-
def test_empty_phone_object
|
102
|
-
|
103
|
-
hIn = {}
|
104
|
-
intObj = []
|
105
|
-
|
106
|
-
assert_equal intObj, @@NameSpace.unpack(hIn)
|
107
|
-
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|