Sha256: 3a7316c0283d5e29d4273720403a1d6c25a6da5060d2129a5ad4c75db8f41645
Contents?: true
Size: 1.68 KB
Versions: 4
Compression:
Stored size: 1.68 KB
Contents
require 'test/unit' require 'voruby/resources/voresource/voresource_v0_10' include VORuby::Resources::VOResource::V0_10 class ResourceTest < Test::Unit::TestCase def setup assert_nothing_raised { @res = Resource.load_from_file('test/resources/voresource/resource_v0_10.xml') } end def test_update assert_equal('2000-12-16', @res.updated.strftime('%Y-%m-%d')) end def test_title assert_equal('1997 WIYN binary stars speckle observations (Horch+, 1999) - Individual notes (tables 2, 3 and 4)', @res.title.strip) end def test_short_name assert_equal('ivo://CDS/VizieR/J/AJ/117/548/notes', @res.identifier.value.to_s) end def test_curation assert_equal('CDS', @res.curation.publisher.value) assert_equal('NOT PROVIDED', @res.curation.contributors[0].value) assert_equal('NOT PROVIDED', @res.curation.version) end def test_content assert_equal('Multiple_Stars', @res.content.subjects[0].value) assert_equal('http://vizier.u-strasbg.fr/cgi-bin/Cat?J/AJ/117/548/notes', @res.content.reference_url.value.to_s) assert_equal('Research', @res.content.content_levels[0].value) end end class OrganisationTest < ResourceTest def setup assert_nothing_raised { @res = Organisation.load_from_file('test/resources/voresource/resource_organisation_v0_10.xml') } end def test_facilities assert_equal('WIYN', @res.facilities[0].value) end def test_instruments assert_equal('MAMA', @res.instruments[0].value) end end class ServiceTest < ResourceTest def setup assert_nothing_raised { @res = Service.load_from_file('test/resources/voresource/resource_service_v0_10.xml') } end end
Version data entries
4 entries across 4 versions & 1 rubygems