Sha256: 54674aab3b7b3b82850800cafcdd45d454a2fe01d38a89eb41c4a89d12d70fa1

Contents?: true

Size: 791 Bytes

Versions: 14

Compression:

Stored size: 791 Bytes

Contents

# $Id: tc_node_xlink.rb 710 2009-01-20 05:30:51Z cfis $
require "xml"
require 'test/unit'

class TC_XML_Node_XLink < Test::Unit::TestCase
  def setup()
    xp = XML::Parser.string('<ruby_array xmlns:xlink="http://www.w3.org/1999/xlink/namespace/"><fixnum xlink:type="simple">one</fixnum></ruby_array>')
    doc = xp.parse
    assert_instance_of(XML::Document, doc)
    @root = doc.root
    assert_instance_of(XML::Node, @root)
  end

  def teardown()
    @root = nil
  end

  def test_xml_node_xlink()
    for elem in @root.find('fixnum')
      assert_instance_of(XML::Node, elem)
      assert_instance_of(TrueClass, elem.xlink?)
      assert_equal("simple", elem.xlink_type_name)
      assert_equal(XML::Node::XLINK_TYPE_SIMPLE, elem.xlink_type)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
libxml-ruby-1.1.0-x86-mswin32-60 test/tc_node_xlink.rb
libxml-ruby-0.9.9-x86-mswin32-60 test/tc_node_xlink.rb
libxml-ruby-0.9.8 test/tc_node_xlink.rb
libxml-ruby-0.9.8-x86-mswin32-60 test/tc_node_xlink.rb
libxml-ruby-0.9.9 test/tc_node_xlink.rb
libxml-ruby-1.0.0 test/tc_node_xlink.rb
libxml-ruby-1.0.0-x86-mswin32-60 test/tc_node_xlink.rb
libxml-ruby-1.1.0 test/tc_node_xlink.rb
libxml-ruby-1.1.3 test/tc_node_xlink.rb
libxml-ruby-1.1.1 test/tc_node_xlink.rb
libxml-ruby-1.1.1-x86-mswin32-60 test/tc_node_xlink.rb
libxml-ruby-1.1.2 test/tc_node_xlink.rb
libxml-ruby-1.1.2-x86-mswin32-60 test/tc_node_xlink.rb
libxml-ruby-1.1.3-x86-mswin32-60 test/tc_node_xlink.rb