Sha256: d553c5b8bde54c875b07df3bbc00fc08cc3a2047ee93d876f59e69b53c43f36b
Contents?: true
Size: 1.23 KB
Versions: 6
Compression:
Stored size: 1.23 KB
Contents
=begin * Description: Test Mdcodes methods * Author: Josh Bradley * Date: 2014-11-07 * License: Public Domain =end require 'minitest/autorun' require File.join(File.dirname(__FILE__),'..','lib', 'adiwg-mdcodes.rb') class TestMdcodes < Minitest::Test def test_parseYaml @errors = Array.new FileList[ADIWG::Mdcodes.getYamlPath + '**/*.yml'].each do |fname| yaml = begin YAML.load_file(fname) rescue Exception => e @errors << "Could not parse YAML: #{fname}" end end assert(@errors.empty?, @errors.join("\n")) end def test_yamlResourceDir yamlDir = ADIWG::Mdcodes.getYamlPath assert(Dir.exists?(yamlDir), 'Did not find resource Directory.') end def test_getAllCodeistsDetail assert_instance_of(Hash,ADIWG::Mdcodes.getAllCodeistsDetail) end def test_getCodelistDetail yaml = ADIWG::Mdcodes.getAllCodeistsDetail key = yaml.keys[0] assert_instance_of(Hash,ADIWG::Mdcodes.getCodelistDetail(key)) end def test_getAllStaticCodelists assert_instance_of(Hash,ADIWG::Mdcodes.getAllStaticCodelists) end def test_getStaticCodelist yaml = ADIWG::Mdcodes.getAllStaticCodelists key = yaml.keys[0] assert_instance_of(Hash,ADIWG::Mdcodes.getStaticCodelist(key)) end end
Version data entries
6 entries across 6 versions & 1 rubygems