Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Sep 18, 2024
1 parent 25ba3ac commit 7151ee5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions test/readers/iso19115_2/tc_iso19115_2_resource_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_resource_info_complete
assert hDictionary.instance_of? Hash
refute_empty hDictionary[:citation]
assert hDictionary[:citation].instance_of? Hash
assert_equal('this is a test abstract for iso19115-2', hDictionary[:abstract])
assert_equal('abstract', hDictionary[:abstract])
end

def test_no_citation
Expand All @@ -45,7 +45,9 @@ def test_no_abstract
hResponse = Marshal.load(Marshal.dump(@@hResponseObj))
_hDictionary = @@nameSpace.unpack(xIn, hResponse)

assert_equal(["WARNING: ISO19115-2 reader: element 'gmd:abstract//gco:CharacterString' is missing in MD_DataIdentification"],
expected = "WARNING: ISO19115-2 reader: element 'gmd:abstract//gco:CharacterString'"\
' is missing in MD_DataIdentification'
assert_equal([expected],
hResponse[:readerExecutionMessages])
assert_equal(false, hResponse[:readerExecutionPass])
end
Expand Down
2 changes: 1 addition & 1 deletion test/readers/iso19115_2/tc_iso19115_2_responsibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_responsibility_complete
assert_equal('organization', party[:contactType])
assert_equal('organization name', party[:contactName])

assert_equal(['[email protected]'], party[:emailList])
assert_equal(['[email protected]'], party[:eMailList])
end

def test_responsibility_no_role_code
Expand Down
10 changes: 10 additions & 0 deletions test/readers/iso19115_2/testData/iso19115-2_no_abstract_dataid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
<gmd:title>
<gco:CharacterString>ISO19115-2 citation title test 123456</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2017</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://mdtranslator.adiwg.org/api/codelists?format=xml#CI_DateTypeCode" codeListValue="publication" codeSpace="002"/>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
</gmd:CI_Citation>
</gmd:citation>
<!-- no abstract for MD_DataIdentification -->
Expand Down
2 changes: 1 addition & 1 deletion test/translator/tc_iso19115_2_to_dcatus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ def test_theme
res = dcatusNS.build(@@intMetadata)
assert_equal('biota farming', res)
end
end
end

0 comments on commit 7151ee5

Please sign in to comment.