Sha256: 4d0a008e0495fc9cda9df897707fd0c2f4313d92bd995c64005ffa4a15653266

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

require 'helper.rb'
require 'adiwg-mdcodes'

class TestProjection < TestHelper
    def test_projection
        errors = JSON::Validator.fully_validate('projection.json', @@example + 'projection.json', strict: @@strict, list: true)
        assert(errors.empty?, errors.join("\n"))
    end

    def test_mapProjection
        codes = ADIWG::Mdcodes::getCodelistDetail('adiwg_mapProjection')["codelist"]
        data = codes.map do |c|
            {:projectionIdentifier => {:identifier => c["code"], :namespace => "org.adiwg.code.mapProjection"}}
        end
        errors = JSON::Validator.fully_validate('projection.json', data, strict: @@strict, list: true)
        assert(errors.empty?, errors.join("\n"))
    end

    def test_mapGridSystem
        codes = ADIWG::Mdcodes::getCodelistDetail('adiwg_mapGridSystem')["codelist"]
        data = codes.map do |c|
            {:gridIdentifier => {:identifier => c["code"], :namespace => "org.adiwg.code.mapGridSystem"}, :projectionIdentifier => {:identifier => "identifier"}}
        end
        errors = JSON::Validator.fully_validate('projection.json', data, strict: @@strict, list: true)
        assert(errors.empty?, errors.join("\n"))
    end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
adiwg-mdjson_schemas-2.9.2.pre.beta.21 test/tc_projection.rb
adiwg-mdjson_schemas-2.9.2.pre.beta.20 test/tc_projection.rb
adiwg-mdjson_schemas-2.9.2.pre.beta.19 test/tc_projection.rb
adiwg-mdjson_schemas-2.9.1 test/tc_projection.rb
adiwg-mdjson_schemas-2.9.0 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.1 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.beta9 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.beta8 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.rc8 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.rc7 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.beta6 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.beta3 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.beta2 test/tc_projection.rb
adiwg-mdjson_schemas-2.8.0.pre.beta test/tc_projection.rb
adiwg-mdjson_schemas-2.7.0 test/tc_projection.rb
adiwg-mdjson_schemas-2.6.3 test/tc_projection.rb
adiwg-mdjson_schemas-2.6.2 test/tc_projection.rb
adiwg-mdjson_schemas-2.6.1 test/tc_projection.rb
adiwg-mdjson_schemas-2.6.0 test/tc_projection.rb