summaryrefslogtreecommitdiff
path: root/test/xsd
diff options
context:
space:
mode:
Diffstat (limited to 'test/xsd')
-rw-r--r--test/xsd/test_xmlschemaparser.rb9
-rw-r--r--test/xsd/xmlschema.xml5
2 files changed, 6 insertions, 8 deletions
diff --git a/test/xsd/test_xmlschemaparser.rb b/test/xsd/test_xmlschemaparser.rb
index b362120540..ab9421c954 100644
--- a/test/xsd/test_xmlschemaparser.rb
+++ b/test/xsd/test_xmlschemaparser.rb
@@ -6,16 +6,17 @@ module XSD
class TestXMLSchemaParser < Test::Unit::TestCase
- def self.setup(filename)
- @@filename = filename
+ def setup
+ @file = File.join(File.dirname(__FILE__), 'xmlschema.xml')
end
def test_wsdl
- @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@@filename).read)
+ @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read })
+ assert_equal(WSDL::XMLSchema::Schema, @wsdl.class)
+ assert_equal(1, @wsdl.collect_elements.size)
end
end
-TestXMLSchemaParser.setup(File.join(File.dirname(__FILE__), 'xmlschema.xml'))
end
diff --git a/test/xsd/xmlschema.xml b/test/xsd/xmlschema.xml
index 0e9914e64b..018bd0cc67 100644
--- a/test/xsd/xmlschema.xml
+++ b/test/xsd/xmlschema.xml
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
- xmlns:mstns="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd"
- xmlns="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
- targetNamespace="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd"
- id="MessageDataSet"
+ targetNamespace="urn:jp.gr.jin.rrr.example.fakeschema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MessageDataSet">
<xs:complexType>