summaryrefslogtreecommitdiff
path: root/test/xmlrpc
diff options
context:
space:
mode:
Diffstat (limited to 'test/xmlrpc')
-rw-r--r--test/xmlrpc/data/bug_bool.expected3
-rw-r--r--test/xmlrpc/data/bug_bool.xml8
-rw-r--r--test/xmlrpc/data/bug_cdata.expected3
-rw-r--r--test/xmlrpc/data/bug_cdata.xml8
-rw-r--r--test/xmlrpc/data/bug_covert.expected10
-rw-r--r--test/xmlrpc/data/bug_covert.xml6
-rw-r--r--test/xmlrpc/data/datetime_iso8601.xml8
-rw-r--r--test/xmlrpc/data/fault.xml16
-rw-r--r--test/xmlrpc/data/value.expected7
-rw-r--r--test/xmlrpc/data/value.xml22
-rw-r--r--test/xmlrpc/data/xml1.expected243
-rw-r--r--test/xmlrpc/data/xml1.xml1
-rw-r--r--test/xmlrpc/test_datetime.rb159
-rw-r--r--test/xmlrpc/test_features.rb48
-rw-r--r--test/xmlrpc/test_marshal.rb93
-rw-r--r--test/xmlrpc/test_parser.rb85
-rw-r--r--test/xmlrpc/test_webrick_server.rb92
-rw-r--r--test/xmlrpc/webrick_testing.rb37
18 files changed, 0 insertions, 849 deletions
diff --git a/test/xmlrpc/data/bug_bool.expected b/test/xmlrpc/data/bug_bool.expected
deleted file mode 100644
index 121e3a8..0000000
--- a/test/xmlrpc/data/bug_bool.expected
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- true
-- false \ No newline at end of file
diff --git a/test/xmlrpc/data/bug_bool.xml b/test/xmlrpc/data/bug_bool.xml
deleted file mode 100644
index 04ed007..0000000
--- a/test/xmlrpc/data/bug_bool.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<methodResponse>
- <params>
- <param>
- <value><boolean>0</boolean></value>
- </param>
- </params>
-</methodResponse>
diff --git a/test/xmlrpc/data/bug_cdata.expected b/test/xmlrpc/data/bug_cdata.expected
deleted file mode 100644
index 17d7861..0000000
--- a/test/xmlrpc/data/bug_cdata.expected
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- true
-- test \ No newline at end of file
diff --git a/test/xmlrpc/data/bug_cdata.xml b/test/xmlrpc/data/bug_cdata.xml
deleted file mode 100644
index ba990e0..0000000
--- a/test/xmlrpc/data/bug_cdata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<methodResponse>
- <params>
- <param>
- <value><string><![CDATA[test]]></string></value>
- </param>
- </params>
-</methodResponse>
diff --git a/test/xmlrpc/data/bug_covert.expected b/test/xmlrpc/data/bug_covert.expected
deleted file mode 100644
index a9ac103..0000000
--- a/test/xmlrpc/data/bug_covert.expected
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- true
-- >
- Site,SANs,Array
-
- Configured Capacity,Array Reserved Capacity,Array Ava
-
- ilable Capacity,Array % Reserved,Host Allocated,Host Used,Host Free,Host %
-
- Used
diff --git a/test/xmlrpc/data/bug_covert.xml b/test/xmlrpc/data/bug_covert.xml
deleted file mode 100644
index 1d9abd2..0000000
--- a/test/xmlrpc/data/bug_covert.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"
-encoding="ISO-8859-1"?><methodResponse><params><param><value>Site,SANs,Array
-Configured Capacity,Array Reserved Capacity,Array Ava
-ilable Capacity,Array % Reserved,Host Allocated,Host Used,Host Free,Host %
-Used
-</value></param></params></methodResponse>
diff --git a/test/xmlrpc/data/datetime_iso8601.xml b/test/xmlrpc/data/datetime_iso8601.xml
deleted file mode 100644
index 43d8da6..0000000
--- a/test/xmlrpc/data/datetime_iso8601.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<methodResponse>
- <params>
- <param>
- <value><dateTime.iso8601>20041105T01:15:23Z</dateTime.iso8601></value>
- </param>
- </params>
-</methodResponse>
diff --git a/test/xmlrpc/data/fault.xml b/test/xmlrpc/data/fault.xml
deleted file mode 100644
index 041c464..0000000
--- a/test/xmlrpc/data/fault.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<methodResponse>
- <fault>
- <value><struct>
- <member>
- <name>faultCode</name>
- <value><int>4</int></value>
- </member>
- <member>
- <name>faultString</name>
- <value>an error message</value>
- </member>
- </struct></value>
- </fault>
-</methodResponse>
-
diff --git a/test/xmlrpc/data/value.expected b/test/xmlrpc/data/value.expected
deleted file mode 100644
index 9463d02..0000000
--- a/test/xmlrpc/data/value.expected
+++ /dev/null
@@ -1,7 +0,0 @@
----
-- Test
--
- - Hallo Leute
- - " Hallo "
- - ''
- - " " \ No newline at end of file
diff --git a/test/xmlrpc/data/value.xml b/test/xmlrpc/data/value.xml
deleted file mode 100644
index 1978616..0000000
--- a/test/xmlrpc/data/value.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<methodCall>
- <methodName>Test</methodName>
- <params>
- <param>
- <value>Hallo Leute</value>
- </param>
- <param>
- <value> Hallo </value>
- </param>
- <param>
- <value></value>
- </param>
- <param>
- <value> </value>
- </param>
- </params>
-</methodCall>
-
-
-
-
diff --git a/test/xmlrpc/data/xml1.expected b/test/xmlrpc/data/xml1.expected
deleted file mode 100644
index ff96de8..0000000
--- a/test/xmlrpc/data/xml1.expected
+++ /dev/null
@@ -1,243 +0,0 @@
----
-- true
--
- -
- subscriber: MegaCorp
- lastName: Baker
- telephone1: 1-508-791-1267
- telephone2: 1-800-445-2588
- password: p1111
- OID: "1"
- email: hbaker@yahoo.com
- adminId: hbaker
- objectName: AdministratorDO
- -
- subscriber: CornerStore
- lastName: Dragon
- telephone1: 1-781-789-9089
- telephone2: 1-800-445-2588
- password: p3333
- OID: "3"
- email: adragon@yahoo.com
- adminId: adragon
- objectName: AdministratorDO
- -
- subscriber: Cyberdyne
- lastName: Rodman
- telephone1: 1-617-789-1890
- telephone2: 1-800-445-2588
- password: p4444
- OID: "4"
- email: mrodman@yahoo.com
- adminId: mrodman
- objectName: AdministratorDO
- -
- subscriber: StarSports
- lastName: Jordan
- telephone1: 1-617-890-7897
- telephone2: 1-800-445-2588
- password: p5555
- OID: "5"
- email: mjordan@yahoo.com
- adminId: mjordan
- objectName: AdministratorDO
- -
- subscriber: GreatBooks
- lastName: Pippen
- telephone1: 1-781-789-9876
- telephone2: 1-800-445-2588
- password: p6666
- OID: "6"
- email: gpippen@yahoo.com
- adminId: gpippen
- objectName: AdministratorDO
- -
- subscriber: AxisChemicals
- lastName: Andhrew
- telephone1: 1-781-678-8970
- telephone2: 1-800-445-2588
- password: p7777
- OID: "7"
- email: aandrew@yahoo.com
- adminId: aandrew
- objectName: AdministratorDO
- -
- subscriber: MediaShop
- lastName: Vincent
- telephone1: 1-786-897-8908
- telephone2: 1-800-445-2588
- password: p8888
- OID: "8"
- email: tvincent@yahoo.com
- adminId: tvincent
- objectName: AdministratorDO
- -
- subscriber: SmartShop
- lastName: Richard
- telephone1: 1-508-789-6789
- telephone2: 1-800-445-2588
- password: p9999
- OID: "9"
- email: krichard@yahoo.com
- adminId: krichard
- objectName: AdministratorDO
- -
- subscriber: HomeNeeds
- lastName: Cornell
- telephone1: 1-617-789-8979
- telephone2: 1-800-445-2588
- password: paaaa
- OID: "10"
- email: gconell@yahoo.com
- adminId: gcornell
- objectName: AdministratorDO
- -
- subscriber: MegaCorp
- lastName: HorstMann
- telephone1: 1-508-791-1267
- telephone2: 1-800-445-2588
- password: p1111
- OID: "11"
- email: shorstmann@yahoo.com
- adminId: shorstmann
- objectName: AdministratorDO
- -
- subscriber: CornerStore
- lastName: Bob
- telephone1: 1-781-789-9089
- telephone2: 1-800-445-2588
- password: p3333
- OID: "13"
- email: rbob@yahoo.com
- adminId: rbob
- objectName: AdministratorDO
- -
- subscriber: Cyberdyne
- lastName: Peter
- telephone1: 1-617-789-1890
- telephone2: 1-800-445-2588
- password: p4444
- OID: "14"
- email: speter@yahoo.com
- adminId: speter
- objectName: AdministratorDO
- -
- subscriber: StarSports
- lastName: Novak
- telephone1: 1-617-890-7897
- telephone2: 1-800-445-2588
- password: p5555
- OID: "15"
- email: pnovak@yahoo.com
- adminId: pnovak
- objectName: AdministratorDO
- -
- subscriber: GreatBooks
- lastName: Nancy
- telephone1: 1-781-789-9876
- telephone2: 1-800-445-2588
- password: p6666
- OID: "16"
- email: pnancy@yahoo.com
- adminId: pnancy
- objectName: AdministratorDO
- -
- subscriber: AxisChemicals
- lastName: Michel
- telephone1: 1-781-678-8970
- telephone2: 1-800-445-2588
- password: p7777
- OID: "17"
- email: hmichel@yahoo.com
- adminId: hmichel
- objectName: AdministratorDO
- -
- subscriber: MediaShop
- lastName: David
- telephone1: 1-786-897-8908
- telephone2: 1-800-445-2588
- password: p8888
- OID: "18"
- email: kdavid@yahoo.com
- adminId: kdavid
- objectName: AdministratorDO
- -
- subscriber: SmartShop
- lastName: Valnoor
- telephone1: 1-508-789-6789
- telephone2: 1-800-445-2588
- password: p9999
- OID: "19"
- email: pvalnoor@yahoo.com
- adminId: pvalnoor
- objectName: AdministratorDO
- -
- subscriber: HomeNeeds
- lastName: Smith
- telephone1: 1-617-789-8979
- telephone2: 1-800-445-2588
- password: paaaa
- OID: "20"
- email: wsmith@yahoo.com
- adminId: wsmith
- objectName: AdministratorDO
- -
- subscriber: MegaCorp
- lastName: Caral
- telephone1: 1-781-789-9876
- telephone2: 1-800-445-2588
- password: p6666
- OID: "21"
- email: gcaral@yahoo.com
- adminId: gcaral
- objectName: AdministratorDO
- -
- subscriber: CornerStore
- lastName: Hillary
- telephone1: 1-786-897-8908
- telephone2: 1-800-445-2588
- password: p8888
- OID: "23"
- email: phillary@yahoo.com
- adminId: phillary
- objectName: AdministratorDO
- -
- subscriber: Cyberdyne
- lastName: Philip
- telephone1: 1-508-789-6789
- telephone2: 1-800-445-2588
- password: p9999
- OID: "24"
- email: bphilip@yahoo.com
- adminId: bphilip
- objectName: AdministratorDO
- -
- subscriber: StarSports
- lastName: Andrea
- telephone1: 1-617-789-8979
- telephone2: 1-800-445-2588
- password: paaaa
- OID: "25"
- email: sandrea@yahoo.com
- adminId: sandrea
- objectName: AdministratorDO
- -
- subscriber: s4
- lastName: "null"
- telephone1: "null"
- telephone2: "null"
- password: s4
- OID: "26"
- email: "null"
- adminId: s4
- objectName: AdministratorDO
- -
- subscriber: BigBank
- lastName: administrator
- telephone1: ''
- telephone2: ''
- password: admin
- OID: "82"
- email: ''
- adminId: admin
- objectName: AdministratorDO \ No newline at end of file
diff --git a/test/xmlrpc/data/xml1.xml b/test/xmlrpc/data/xml1.xml
deleted file mode 100644
index 10aa554..0000000
--- a/test/xmlrpc/data/xml1.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><params><param><value><array><data><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>hbaker</value></member><member><name>email</name><value>hbaker@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-508-791-1267</value></member><member><name>OID</name><value>1</value></member><member><name>password</name><value>p1111</value></member><member><name>lastName</name><value>Baker</value></member><member><name>subscriber</name><value>MegaCorp</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>adragon</value></member><member><name>email</name><value>adragon@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-789-9089</value></member><member><name>OID</name><value>3</value></member><member><name>password</name><value>p3333</value></member><member><name>lastName</name><value>Dragon</value></member><member><name>subscriber</name><value>CornerStore</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>mrodman</value></member><member><name>email</name><value>mrodman@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-789-1890</value></member><member><name>OID</name><value>4</value></member><member><name>password</name><value>p4444</value></member><member><name>lastName</name><value>Rodman</value></member><member><name>subscriber</name><value>Cyberdyne</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>mjordan</value></member><member><name>email</name><value>mjordan@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-890-7897</value></member><member><name>OID</name><value>5</value></member><member><name>password</name><value>p5555</value></member><member><name>lastName</name><value>Jordan</value></member><member><name>subscriber</name><value>StarSports</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>gpippen</value></member><member><name>email</name><value>gpippen@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-789-9876</value></member><member><name>OID</name><value>6</value></member><member><name>password</name><value>p6666</value></member><member><name>lastName</name><value>Pippen</value></member><member><name>subscriber</name><value>GreatBooks</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>aandrew</value></member><member><name>email</name><value>aandrew@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-678-8970</value></member><member><name>OID</name><value>7</value></member><member><name>password</name><value>p7777</value></member><member><name>lastName</name><value>Andhrew</value></member><member><name>subscriber</name><value>AxisChemicals</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>tvincent</value></member><member><name>email</name><value>tvincent@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-786-897-8908</value></member><member><name>OID</name><value>8</value></member><member><name>password</name><value>p8888</value></member><member><name>lastName</name><value>Vincent</value></member><member><name>subscriber</name><value>MediaShop</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>krichard</value></member><member><name>email</name><value>krichard@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-508-789-6789</value></member><member><name>OID</name><value>9</value></member><member><name>password</name><value>p9999</value></member><member><name>lastName</name><value>Richard</value></member><member><name>subscriber</name><value>SmartShop</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>gcornell</value></member><member><name>email</name><value>gconell@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-789-8979</value></member><member><name>OID</name><value>10</value></member><member><name>password</name><value>paaaa</value></member><member><name>lastName</name><value>Cornell</value></member><member><name>subscriber</name><value>HomeNeeds</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>shorstmann</value></member><member><name>email</name><value>shorstmann@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-508-791-1267</value></member><member><name>OID</name><value>11</value></member><member><name>password</name><value>p1111</value></member><member><name>lastName</name><value>HorstMann</value></member><member><name>subscriber</name><value>MegaCorp</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>rbob</value></member><member><name>email</name><value>rbob@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-789-9089</value></member><member><name>OID</name><value>13</value></member><member><name>password</name><value>p3333</value></member><member><name>lastName</name><value>Bob</value></member><member><name>subscriber</name><value>CornerStore</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>speter</value></member><member><name>email</name><value>speter@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-789-1890</value></member><member><name>OID</name><value>14</value></member><member><name>password</name><value>p4444</value></member><member><name>lastName</name><value>Peter</value></member><member><name>subscriber</name><value>Cyberdyne</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>pnovak</value></member><member><name>email</name><value>pnovak@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-890-7897</value></member><member><name>OID</name><value>15</value></member><member><name>password</name><value>p5555</value></member><member><name>lastName</name><value>Novak</value></member><member><name>subscriber</name><value>StarSports</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>pnancy</value></member><member><name>email</name><value>pnancy@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-789-9876</value></member><member><name>OID</name><value>16</value></member><member><name>password</name><value>p6666</value></member><member><name>lastName</name><value>Nancy</value></member><member><name>subscriber</name><value>GreatBooks</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>hmichel</value></member><member><name>email</name><value>hmichel@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-678-8970</value></member><member><name>OID</name><value>17</value></member><member><name>password</name><value>p7777</value></member><member><name>lastName</name><value>Michel</value></member><member><name>subscriber</name><value>AxisChemicals</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>kdavid</value></member><member><name>email</name><value>kdavid@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-786-897-8908</value></member><member><name>OID</name><value>18</value></member><member><name>password</name><value>p8888</value></member><member><name>lastName</name><value>David</value></member><member><name>subscriber</name><value>MediaShop</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>pvalnoor</value></member><member><name>email</name><value>pvalnoor@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-508-789-6789</value></member><member><name>OID</name><value>19</value></member><member><name>password</name><value>p9999</value></member><member><name>lastName</name><value>Valnoor</value></member><member><name>subscriber</name><value>SmartShop</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>wsmith</value></member><member><name>email</name><value>wsmith@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-789-8979</value></member><member><name>OID</name><value>20</value></member><member><name>password</name><value>paaaa</value></member><member><name>lastName</name><value>Smith</value></member><member><name>subscriber</name><value>HomeNeeds</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>gcaral</value></member><member><name>email</name><value>gcaral@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-781-789-9876</value></member><member><name>OID</name><value>21</value></member><member><name>password</name><value>p6666</value></member><member><name>lastName</name><value>Caral</value></member><member><name>subscriber</name><value>MegaCorp</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>phillary</value></member><member><name>email</name><value>phillary@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-786-897-8908</value></member><member><name>OID</name><value>23</value></member><member><name>password</name><value>p8888</value></member><member><name>lastName</name><value>Hillary</value></member><member><name>subscriber</name><value>CornerStore</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>bphilip</value></member><member><name>email</name><value>bphilip@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-508-789-6789</value></member><member><name>OID</name><value>24</value></member><member><name>password</name><value>p9999</value></member><member><name>lastName</name><value>Philip</value></member><member><name>subscriber</name><value>Cyberdyne</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>sandrea</value></member><member><name>email</name><value>sandrea@yahoo.com</value></member><member><name>telephone2</name><value>1-800-445-2588</value></member><member><name>telephone1</name><value>1-617-789-8979</value></member><member><name>OID</name><value>25</value></member><member><name>password</name><value>paaaa</value></member><member><name>lastName</name><value>Andrea</value></member><member><name>subscriber</name><value>StarSports</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>s4</value></member><member><name>email</name><value>null</value></member><member><name>telephone2</name><value>null</value></member><member><name>telephone1</name><value>null</value></member><member><name>OID</name><value>26</value></member><member><name>password</name><value>s4</value></member><member><name>lastName</name><value>null</value></member><member><name>subscriber</name><value>s4</value></member></struct></value><value><struct><member><name>objectName</name><value>AdministratorDO</value></member><member><name>adminId</name><value>admin</value></member><member><name>email</name><value></value></member><member><name>telephone2</name><value></value></member><member><name>telephone1</name><value></value></member><member><name>OID</name><value>82</value></member><member><name>password</name><value>admin</value></member><member><name>lastName</name><value>administrator</value></member><member><name>subscriber</name><value>BigBank</value></member></struct></value></data></array></value></param></params></methodResponse>
diff --git a/test/xmlrpc/test_datetime.rb b/test/xmlrpc/test_datetime.rb
deleted file mode 100644
index e38cea6..0000000
--- a/test/xmlrpc/test_datetime.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-require 'test/unit'
-require "xmlrpc/datetime"
-
-class Test_DateTime < Test::Unit::TestCase
-
- def test_new
- dt = createDateTime()
-
- assert_instance_of(XMLRPC::DateTime, dt)
- end
-
- def test_new_exception
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(4.5, 13, 32, 25, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 32, 25, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 25, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 60, 60) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 60) }
- assert_nothing_raised(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 59) }
-
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 0, 0, -1, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 0, -1, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, -1, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, -1, -1) }
- assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, -1) }
- assert_nothing_raised(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, 0) }
- end
-
-
- def test_get_values
- y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
- dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
-
- assert_equal(y, dt.year)
- assert_equal(m, dt.month)
- assert_equal(m, dt.mon)
- assert_equal(d, dt.day)
-
- assert_equal(h, dt.hour)
- assert_equal(mi,dt.min)
- assert_equal(s, dt.sec)
- end
-
- def test_set_values
- dt = createDateTime()
- y, m, d, h, mi, s = 1950, 12, 9, 8, 52, 30
-
- dt.year = y
- dt.month = m
- dt.day = d
- dt.hour = h
- dt.min = mi
- dt.sec = s
-
- assert_equal(y, dt.year)
- assert_equal(m, dt.month)
- assert_equal(m, dt.mon)
- assert_equal(d, dt.day)
-
- assert_equal(h, dt.hour)
- assert_equal(mi,dt.min)
- assert_equal(s, dt.sec)
-
- dt.mon = 5
- assert_equal(5, dt.month)
- assert_equal(5, dt.mon)
- end
-
- def test_set_exception
- dt = createDateTime()
-
- assert_raises(ArgumentError) { dt.year = 4.5 }
- assert_nothing_raised(ArgumentError) { dt.year = -2000 }
-
- assert_raises(ArgumentError) { dt.month = 0 }
- assert_raises(ArgumentError) { dt.month = 13 }
- assert_nothing_raised(ArgumentError) { dt.month = 7 }
-
- assert_raises(ArgumentError) { dt.mon = 0 }
- assert_raises(ArgumentError) { dt.mon = 13 }
- assert_nothing_raised(ArgumentError) { dt.mon = 7 }
-
- assert_raises(ArgumentError) { dt.day = 0 }
- assert_raises(ArgumentError) { dt.day = 32 }
- assert_nothing_raised(ArgumentError) { dt.day = 16 }
-
- assert_raises(ArgumentError) { dt.hour = -1 }
- assert_raises(ArgumentError) { dt.hour = 25 }
- assert_nothing_raised(ArgumentError) { dt.hour = 12 }
-
- assert_raises(ArgumentError) { dt.min = -1 }
- assert_raises(ArgumentError) { dt.min = 60 }
- assert_nothing_raised(ArgumentError) { dt.min = 30 }
-
- assert_raises(ArgumentError) { dt.sec = -1 }
- assert_raises(ArgumentError) { dt.sec = 60 }
- assert_nothing_raised(ArgumentError) { dt.sec = 30 }
- end
-
- def test_to_a
- y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
- dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
- a = dt.to_a
-
- assert_instance_of(Array, a)
- assert_equal(6, a.size, "Returned array has wrong size")
-
- assert_equal(y, a[0])
- assert_equal(m, a[1])
- assert_equal(d, a[2])
- assert_equal(h, a[3])
- assert_equal(mi, a[4])
- assert_equal(s, a[5])
- end
-
- def test_to_time1
- y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
- dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
- time = dt.to_time
-
- assert_not_nil(time)
-
- assert_equal(y, time.year)
- assert_equal(m, time.month)
- assert_equal(d, time.day)
- assert_equal(h, time.hour)
- assert_equal(mi, time.min)
- assert_equal(s, time.sec)
- end
-
- def test_to_time2
- dt = createDateTime()
- dt.year = 1969
-
- assert_nil(dt.to_time)
- end
-
- def test_to_date1
- y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
- dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
- date = dt.to_date
-
- assert_equal(y, date.year)
- assert_equal(m, date.month)
- assert_equal(d, date.day)
- end
-
- def test_to_date2
- dt = createDateTime()
- dt.year = 666
-
- assert_equal(666, dt.to_date.year)
- end
-
-
- def createDateTime
- XMLRPC::DateTime.new(1970, 3, 24, 12, 0, 5)
- end
-
-end
diff --git a/test/xmlrpc/test_features.rb b/test/xmlrpc/test_features.rb
deleted file mode 100644
index 96a6313..0000000
--- a/test/xmlrpc/test_features.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-require 'test/unit'
-require "xmlrpc/create"
-require "xmlrpc/parser"
-require "xmlrpc/config"
-
-class Test_Features < Test::Unit::TestCase
-
- def setup
- @params = [nil, {"test" => nil}, [nil, 1, nil]]
- end
-
- def test_nil_create
- XMLRPC::XMLWriter.each_installed_writer do |writer|
- c = XMLRPC::Create.new(writer)
-
- XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)}
- XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, false)
- assert_raises(RuntimeError) { str = c.methodCall("test", *@params) }
-
- XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)}
- XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, true)
- assert_nothing_raised { str = c.methodCall("test", *@params) }
- end
- end
-
- def test_nil_parse
- XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)}
- XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, true)
-
- XMLRPC::XMLWriter.each_installed_writer do |writer|
- c = XMLRPC::Create.new(writer)
- str = c.methodCall("test", *@params)
- XMLRPC::XMLParser.each_installed_parser do |parser|
- para = nil
-
- XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_PARSER)}
- XMLRPC::Config.const_set(:ENABLE_NIL_PARSER, false)
- assert_raises(RuntimeError) { para = parser.parseMethodCall(str) }
-
- XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_PARSER)}
- XMLRPC::Config.const_set(:ENABLE_NIL_PARSER, true)
- assert_nothing_raised { para = parser.parseMethodCall(str) }
- assert_equal(para[1], @params)
- end
- end
- end
-
-end
diff --git a/test/xmlrpc/test_marshal.rb b/test/xmlrpc/test_marshal.rb
deleted file mode 100644
index 38bc8c6..0000000
--- a/test/xmlrpc/test_marshal.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-require 'test/unit'
-require "xmlrpc/marshal"
-
-class Test_Marshal < Test::Unit::TestCase
- # for test_parser_values
- class Person
- include XMLRPC::Marshallable
- attr_reader :name
- def initialize(name)
- @name = name
- end
- end
-
-
- def test1_dump_response
- assert_nothing_raised(NameError) {
- XMLRPC::Marshal.dump_response('arg')
- }
- end
-
- def test1_dump_call
- assert_nothing_raised(NameError) {
- XMLRPC::Marshal.dump_call('methodName', 'arg')
- }
- end
-
- def test2_dump_load_response
- value = [1, 2, 3, {"test" => true}, 3.4]
- res = XMLRPC::Marshal.dump_response(value)
-
- assert_equal(value, XMLRPC::Marshal.load_response(res))
- end
-
- def test2_dump_load_call
- methodName = "testMethod"
- value = [1, 2, 3, {"test" => true}, 3.4]
- exp = [methodName, [value, value]]
-
- res = XMLRPC::Marshal.dump_call(methodName, value, value)
-
- assert_equal(exp, XMLRPC::Marshal.load_call(res))
- end
-
- def test_parser_values
- v1 = [
- 1, -7778, # integers
- 1.0, 0.0, -333.0, 2343434343.0, # floats
- false, true, true, false, # booleans
- "Hallo", "with < and >", "" # strings
- ]
-
- v2 = [
- [v1, v1, v1],
- {"a" => v1}
- ]
-
- v3 = [
- XMLRPC::Base64.new("\001"*1000), # base64
- :aSymbol, :anotherSym # symbols (-> string)
- ]
- v3_exp = [
- "\001"*1000,
- "aSymbol", "anotherSym"
- ]
- person = Person.new("Michael")
-
- XMLRPC::XMLParser.each_installed_parser do |parser|
- m = XMLRPC::Marshal.new(parser)
-
- assert_equal( v1, m.load_response(m.dump_response(v1)) )
- assert_equal( v2, m.load_response(m.dump_response(v2)) )
- assert_equal( v3_exp, m.load_response(m.dump_response(v3)) )
-
- pers = m.load_response(m.dump_response(person))
-
- assert( pers.is_a?(Person) )
- assert( person.name == pers.name )
- end
-
- # missing, Date, Time, DateTime
- # Struct
- end
-
- def test_no_params_tag
- # bug found by Idan Sofer
-
- expect = %{<?xml version="1.0" ?><methodCall><methodName>myMethod</methodName><params/></methodCall>\n}
-
- str = XMLRPC::Marshal.dump_call("myMethod")
- assert_equal(expect, str)
- end
-
-end
diff --git a/test/xmlrpc/test_parser.rb b/test/xmlrpc/test_parser.rb
deleted file mode 100644
index 44ca1f8..0000000
--- a/test/xmlrpc/test_parser.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-require 'test/unit'
-require 'xmlrpc/datetime'
-require "xmlrpc/parser"
-require 'yaml'
-
-module GenericParserTest
- def datafile(base)
- File.join(File.dirname(__FILE__), "data", base)
- end
-
- def load_data(name)
- [File.read(datafile(name) + ".xml"), YAML.load(File.read(datafile(name) + ".expected"))]
- end
-
- def setup
- @xml1, @expected1 = load_data('xml1')
- @xml2, @expected2 = load_data('bug_covert')
- @xml3, @expected3 = load_data('bug_bool')
- @xml4, @expected4 = load_data('value')
-
- @cdata_xml, @cdata_expected = load_data('bug_cdata')
-
- @datetime_xml = File.read(datafile('datetime_iso8601.xml'))
- @datetime_expected = XMLRPC::DateTime.new(2004, 11, 5, 1, 15, 23)
-
- @fault_doc = File.read(datafile('fault.xml'))
- end
-
- # test parseMethodResponse --------------------------------------------------
-
- def test_parseMethodResponse1
- assert_equal(@expected1, @p.parseMethodResponse(@xml1))
- end
-
- def test_parseMethodResponse2
- assert_equal(@expected2, @p.parseMethodResponse(@xml2))
- end
-
- def test_parseMethodResponse3
- assert_equal(@expected3, @p.parseMethodResponse(@xml3))
- end
-
- def test_cdata
- assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml))
- end
-
- def test_dateTime
- assert_equal(@datetime_expected, @p.parseMethodResponse(@datetime_xml)[1])
- end
-
- # test parseMethodCall ------------------------------------------------------
-
- def test_parseMethodCall
- assert_equal(@expected4, @p.parseMethodCall(@xml4))
- end
-
- # test fault ----------------------------------------------------------------
-
- def test_fault
- flag, fault = @p.parseMethodResponse(@fault_doc)
- assert_equal(flag, false)
- unless fault.is_a? XMLRPC::FaultException
- assert(false, "must be an instance of class XMLRPC::FaultException")
- end
- assert_equal(fault.faultCode, 4)
- assert_equal(fault.faultString, "an error message")
- end
-end
-
-# create test class for each installed parser
-XMLRPC::XMLParser.each_installed_parser do |parser|
- klass = parser.class
- name = klass.to_s.split("::").last
-
- eval %{
- class Test_#{name} < Test::Unit::TestCase
- include GenericParserTest
-
- def setup
- super
- @p = #{klass}.new
- end
- end
- }
-end
diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb
deleted file mode 100644
index e7fed01..0000000
--- a/test/xmlrpc/test_webrick_server.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-require 'test/unit'
-require 'webrick'
-require File.join(File.dirname(__FILE__), 'webrick_testing')
-require "xmlrpc/server"
-require 'xmlrpc/client'
-
-class Test_Webrick < Test::Unit::TestCase
- include WEBrick_Testing
-
- def create_servlet
- s = XMLRPC::WEBrickServlet.new
-
- s.add_handler("test.add") do |a,b|
- a + b
- end
-
- s.add_handler("test.div") do |a,b|
- if b == 0
- raise XMLRPC::FaultException.new(1, "division by zero")
- else
- a / b
- end
- end
-
- s.set_default_handler do |name, *args|
- raise XMLRPC::FaultException.new(-99, "Method #{name} missing" +
- " or wrong number of parameters!")
- end
-
- s.add_introspection
-
- return s
- end
-
- def setup_http_server(port, use_ssl)
- require 'webrick/https'
- start_server(
- :Port => port,
- :SSLEnable => use_ssl,
- :SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE,
- :SSLCertName => []
- ) {|w| w.mount('/RPC2', create_servlet) }
-
- @s = XMLRPC::Client.new3(:port => port, :use_ssl => use_ssl)
- end
-
- PORT = 8070
- def test_client_server
- # NOTE: I don't enable SSL testing as this hangs
- [false].each do |use_ssl|
- begin
- setup_http_server(PORT, use_ssl)
- do_test
- ensure
- stop_server
- end
- end
- end
-
- def do_test
- # simple call
- assert_equal 9, @s.call('test.add', 4, 5)
-
- # fault exception
- assert_raises(XMLRPC::FaultException) { @s.call('test.div', 1, 0) }
-
- # fault exception via call2
- ok, param = @s.call2('test.div', 1, 0)
- assert_equal false, ok
- assert_instance_of XMLRPC::FaultException, param
- assert_equal 1, param.faultCode
- assert_equal 'division by zero', param.faultString
-
- # call2 without fault exception
- ok, param = @s.call2('test.div', 10, 5)
- assert_equal true, ok
- assert_equal param, 2
-
- # introspection
- assert_equal ["test.add", "test.div", "system.listMethods", "system.methodSignature", "system.methodHelp"], @s.call("system.listMethods")
-
- # default handler (missing handler)
- ok, param = @s.call2('test.nonexisting')
- assert_equal false, ok
- assert_equal -99, param.faultCode
-
- # default handler (wrong number of arguments)
- ok, param = @s.call2('test.add', 1, 2, 3)
- assert_equal false, ok
- assert_equal -99, param.faultCode
- end
-end
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
deleted file mode 100644
index a6830ce..0000000
--- a/test/xmlrpc/webrick_testing.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require 'timeout'
-
-module WEBrick_Testing
- class DummyLog < WEBrick::BasicLog
- def initialize() super(self) end
- def <<(*args) end
- end
-
- def start_server(config={})
- raise "already started" if @__server
- @__started = false
-
- Thread.new {
- @__server = WEBrick::HTTPServer.new(
- {
- :Logger => DummyLog.new,
- :AccessLog => [],
- :StartCallback => proc { @__started = true }
- }.update(config))
- yield @__server
- @__server.start
- @__started = false
- }
-
- Timeout.timeout(5) {
- nil until @__started # wait until the server is ready
- }
- end
-
- def stop_server
- Timeout.timeout(5) {
- @__server.shutdown
- nil while @__started # wait until the server is down
- }
- @__server = nil
- end
-end