google4r-checkout 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +6 -2
- data/lib/google4r/checkout/notifications.rb +15 -15
- data/test/unit/add_merchant_order_number_command_test.rb +1 -141
- data/test/unit/add_tracking_data_command_test.rb +0 -150
- data/test/unit/archive_order_command_test.rb +0 -132
- data/test/unit/authorization_amount_notification_test.rb +0 -138
- data/test/unit/authorize_order_command_test.rb +0 -132
- data/test/unit/chargeback_amount_notification_test.rb +0 -130
- data/test/unit/refund_amount_notification_test.rb +0 -130
- data/test/unit/refund_order_command_test.rb +0 -172
- data/test/unit/send_buyer_message_command_test.rb +0 -146
- data/test/unit/unarchive_order_command_test.rb +0 -132
- metadata +3 -3
@@ -84,175 +84,3 @@ class Google4R::Checkout::RefundOrderCommandTest < Test::Unit::TestCase
|
|
84
84
|
end
|
85
85
|
|
86
86
|
end
|
87
|
-
#--
|
88
|
-
# Project: google_checkout4r
|
89
|
-
# File: test/unit/refund_order_command_test.rb
|
90
|
-
# Author: Tony Chan <api.htchan at gmail dot com>
|
91
|
-
# Copyright: (c) 2007 by Tony Chan
|
92
|
-
# License: MIT License as follows:
|
93
|
-
#
|
94
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
95
|
-
# a copy of this software and associated documentation files (the
|
96
|
-
# "Software"), to deal in the Software without restriction, including
|
97
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
98
|
-
# distribute, sublicense, and/or sell copies of the Software, and to permit
|
99
|
-
# persons to whom the Software is furnished to do so, subject to the
|
100
|
-
# following conditions:
|
101
|
-
#
|
102
|
-
# The above copyright notice and this permission notice shall be included
|
103
|
-
# in all copies or substantial portions of the Software.
|
104
|
-
#
|
105
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
106
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
107
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
108
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
109
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
110
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
111
|
-
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
112
|
-
#++
|
113
|
-
|
114
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
115
|
-
|
116
|
-
require 'google4r/checkout'
|
117
|
-
|
118
|
-
require 'test/frontend_configuration'
|
119
|
-
|
120
|
-
# Tests for the RefundOrderCommand class.
|
121
|
-
class Google4R::Checkout::RefundOrderCommandTest < Test::Unit::TestCase
|
122
|
-
include Google4R::Checkout
|
123
|
-
|
124
|
-
def setup
|
125
|
-
@frontend = Frontend.new(FRONTEND_CONFIGURATION)
|
126
|
-
@command = @frontend.create_refund_order_command
|
127
|
-
@command.google_order_number = '841171949013218'
|
128
|
-
@command.amount = Money.new(1000, 'USD')
|
129
|
-
@command.comment = 'Discount for inconvenience; ship replacement item'
|
130
|
-
@command.reason = 'Damaged Merchandise'
|
131
|
-
|
132
|
-
@sample_xml=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
133
|
-
<refund-order xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'>
|
134
|
-
<amount currency='USD'>10.00</amount>
|
135
|
-
<comment>Discount for inconvenience; ship replacement item</comment>
|
136
|
-
<reason>Damaged Merchandise</reason>
|
137
|
-
</refund-order>}
|
138
|
-
|
139
|
-
@sample_reason_only=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
140
|
-
<refund-order xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'>
|
141
|
-
<reason>Damaged Merchandise</reason>
|
142
|
-
</refund-order>}
|
143
|
-
end
|
144
|
-
|
145
|
-
def test_behaves_correctly
|
146
|
-
[ :google_order_number, :amount, :reason, :comment ].each do |symbol|
|
147
|
-
assert_respond_to @command, symbol
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
def test_xml_with_amount
|
152
|
-
@command.amount = nil
|
153
|
-
@command.comment = nil
|
154
|
-
assert_strings_equal(@sample_reason_only, @command.to_xml)
|
155
|
-
end
|
156
|
-
|
157
|
-
def test_accessors
|
158
|
-
assert_equal('841171949013218', @command.google_order_number)
|
159
|
-
assert_equal(Money.new(1000, 'USD'), @command.amount)
|
160
|
-
assert_equal('Discount for inconvenience; ship replacement item', @command.comment)
|
161
|
-
assert_equal('Damaged Merchandise', @command.reason)
|
162
|
-
end
|
163
|
-
|
164
|
-
def test_xml_generation
|
165
|
-
assert_strings_equal(@sample_xml, @command.to_xml)
|
166
|
-
end
|
167
|
-
|
168
|
-
def test_to_xml_does_not_raise_exception
|
169
|
-
assert_nothing_raised { @command.to_xml }
|
170
|
-
end
|
171
|
-
|
172
|
-
end
|
173
|
-
#--
|
174
|
-
# Project: google_checkout4r
|
175
|
-
# File: test/unit/refund_order_command_test.rb
|
176
|
-
# Author: Tony Chan <api.htchan at gmail dot com>
|
177
|
-
# Copyright: (c) 2007 by Tony Chan
|
178
|
-
# License: MIT License as follows:
|
179
|
-
#
|
180
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
181
|
-
# a copy of this software and associated documentation files (the
|
182
|
-
# "Software"), to deal in the Software without restriction, including
|
183
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
184
|
-
# distribute, sublicense, and/or sell copies of the Software, and to permit
|
185
|
-
# persons to whom the Software is furnished to do so, subject to the
|
186
|
-
# following conditions:
|
187
|
-
#
|
188
|
-
# The above copyright notice and this permission notice shall be included
|
189
|
-
# in all copies or substantial portions of the Software.
|
190
|
-
#
|
191
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
192
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
193
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
194
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
195
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
196
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
197
|
-
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
198
|
-
#++
|
199
|
-
|
200
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
201
|
-
|
202
|
-
require 'google4r/checkout'
|
203
|
-
|
204
|
-
require 'test/frontend_configuration'
|
205
|
-
|
206
|
-
# Tests for the RefundOrderCommand class.
|
207
|
-
class Google4R::Checkout::RefundOrderCommandTest < Test::Unit::TestCase
|
208
|
-
include Google4R::Checkout
|
209
|
-
|
210
|
-
def setup
|
211
|
-
@frontend = Frontend.new(FRONTEND_CONFIGURATION)
|
212
|
-
@command = @frontend.create_refund_order_command
|
213
|
-
@command.google_order_number = '841171949013218'
|
214
|
-
@command.amount = Money.new(1000, 'USD')
|
215
|
-
@command.comment = 'Discount for inconvenience; ship replacement item'
|
216
|
-
@command.reason = 'Damaged Merchandise'
|
217
|
-
|
218
|
-
@sample_xml=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
219
|
-
<refund-order xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'>
|
220
|
-
<amount currency='USD'>10.00</amount>
|
221
|
-
<comment>Discount for inconvenience; ship replacement item</comment>
|
222
|
-
<reason>Damaged Merchandise</reason>
|
223
|
-
</refund-order>}
|
224
|
-
|
225
|
-
@sample_reason_only=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
226
|
-
<refund-order xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'>
|
227
|
-
<reason>Damaged Merchandise</reason>
|
228
|
-
</refund-order>}
|
229
|
-
end
|
230
|
-
|
231
|
-
def test_behaves_correctly
|
232
|
-
[ :google_order_number, :amount, :reason, :comment ].each do |symbol|
|
233
|
-
assert_respond_to @command, symbol
|
234
|
-
end
|
235
|
-
end
|
236
|
-
|
237
|
-
def test_xml_with_amount
|
238
|
-
@command.amount = nil
|
239
|
-
@command.comment = nil
|
240
|
-
assert_strings_equal(@sample_reason_only, @command.to_xml)
|
241
|
-
end
|
242
|
-
|
243
|
-
def test_accessors
|
244
|
-
assert_equal('841171949013218', @command.google_order_number)
|
245
|
-
assert_equal(Money.new(1000, 'USD'), @command.amount)
|
246
|
-
assert_equal('Discount for inconvenience; ship replacement item', @command.comment)
|
247
|
-
assert_equal('Damaged Merchandise', @command.reason)
|
248
|
-
end
|
249
|
-
|
250
|
-
def test_xml_generation
|
251
|
-
assert_strings_equal(@sample_xml, @command.to_xml)
|
252
|
-
end
|
253
|
-
|
254
|
-
def test_to_xml_does_not_raise_exception
|
255
|
-
assert_nothing_raised { @command.to_xml }
|
256
|
-
end
|
257
|
-
|
258
|
-
end
|
@@ -71,149 +71,3 @@ class Google4R::Checkout::SendBuyerMessageCommandTest < Test::Unit::TestCase
|
|
71
71
|
end
|
72
72
|
|
73
73
|
end
|
74
|
-
#--
|
75
|
-
# Project: google_checkout4r
|
76
|
-
# File: test/unit/send_buyer_message_command_test.rb
|
77
|
-
# Author: Tony Chan <api.htchan at gmail dot com>
|
78
|
-
# Copyright: (c) 2007 by Tony Chan
|
79
|
-
# License: MIT License as follows:
|
80
|
-
#
|
81
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
82
|
-
# a copy of this software and associated documentation files (the
|
83
|
-
# "Software"), to deal in the Software without restriction, including
|
84
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
85
|
-
# distribute, sublicense, and/or sell copies of the Software, and to permit
|
86
|
-
# persons to whom the Software is furnished to do so, subject to the
|
87
|
-
# following conditions:
|
88
|
-
#
|
89
|
-
# The above copyright notice and this permission notice shall be included
|
90
|
-
# in all copies or substantial portions of the Software.
|
91
|
-
#
|
92
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
93
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
94
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
95
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
96
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
97
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
98
|
-
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
99
|
-
#++
|
100
|
-
|
101
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
102
|
-
|
103
|
-
require 'google4r/checkout'
|
104
|
-
|
105
|
-
require 'test/frontend_configuration'
|
106
|
-
|
107
|
-
# Tests for the SendBuyerMessageCommand class.
|
108
|
-
class Google4R::Checkout::SendBuyerMessageCommandTest < Test::Unit::TestCase
|
109
|
-
include Google4R::Checkout
|
110
|
-
|
111
|
-
def setup
|
112
|
-
@frontend = Frontend.new(FRONTEND_CONFIGURATION)
|
113
|
-
@command = @frontend.create_send_buyer_message_command
|
114
|
-
|
115
|
-
@command.google_order_number = '841171949013218'
|
116
|
-
@command.message = 'Due to high volume, your order will ship next week. Thank you for your patience.'
|
117
|
-
@command.send_email = true
|
118
|
-
|
119
|
-
@sample_xml=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
120
|
-
<send-buyer-message xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'>
|
121
|
-
<message>Due to high volume, your order will ship next week. Thank you for your patience.</message>
|
122
|
-
<send-email>true</send-email>
|
123
|
-
</send-buyer-message>}
|
124
|
-
end
|
125
|
-
|
126
|
-
def test_behaves_correctly
|
127
|
-
[ :google_order_number, :message, :send_email ].each do |symbol|
|
128
|
-
assert_respond_to @command, symbol
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
def test_xml_send_email
|
133
|
-
assert_strings_equal(@sample_xml, @command.to_xml)
|
134
|
-
end
|
135
|
-
|
136
|
-
def test_accessors
|
137
|
-
assert_equal('841171949013218', @command.google_order_number)
|
138
|
-
assert_equal('Due to high volume, your order will ship next week. Thank you for your patience.', @command.message)
|
139
|
-
assert @command.send_email
|
140
|
-
end
|
141
|
-
|
142
|
-
def test_to_xml_does_not_raise_exception
|
143
|
-
assert_nothing_raised { @command.to_xml }
|
144
|
-
end
|
145
|
-
|
146
|
-
end
|
147
|
-
#--
|
148
|
-
# Project: google_checkout4r
|
149
|
-
# File: test/unit/send_buyer_message_command_test.rb
|
150
|
-
# Author: Tony Chan <api.htchan at gmail dot com>
|
151
|
-
# Copyright: (c) 2007 by Tony Chan
|
152
|
-
# License: MIT License as follows:
|
153
|
-
#
|
154
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
155
|
-
# a copy of this software and associated documentation files (the
|
156
|
-
# "Software"), to deal in the Software without restriction, including
|
157
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
158
|
-
# distribute, sublicense, and/or sell copies of the Software, and to permit
|
159
|
-
# persons to whom the Software is furnished to do so, subject to the
|
160
|
-
# following conditions:
|
161
|
-
#
|
162
|
-
# The above copyright notice and this permission notice shall be included
|
163
|
-
# in all copies or substantial portions of the Software.
|
164
|
-
#
|
165
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
166
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
167
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
168
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
169
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
170
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
171
|
-
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
172
|
-
#++
|
173
|
-
|
174
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
175
|
-
|
176
|
-
require 'google4r/checkout'
|
177
|
-
|
178
|
-
require 'test/frontend_configuration'
|
179
|
-
|
180
|
-
# Tests for the SendBuyerMessageCommand class.
|
181
|
-
class Google4R::Checkout::SendBuyerMessageCommandTest < Test::Unit::TestCase
|
182
|
-
include Google4R::Checkout
|
183
|
-
|
184
|
-
def setup
|
185
|
-
@frontend = Frontend.new(FRONTEND_CONFIGURATION)
|
186
|
-
@command = @frontend.create_send_buyer_message_command
|
187
|
-
|
188
|
-
@command.google_order_number = '841171949013218'
|
189
|
-
@command.message = 'Due to high volume, your order will ship next week. Thank you for your patience.'
|
190
|
-
@command.send_email = true
|
191
|
-
|
192
|
-
@sample_xml=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
193
|
-
<send-buyer-message xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'>
|
194
|
-
<message>Due to high volume, your order will ship next week. Thank you for your patience.</message>
|
195
|
-
<send-email>true</send-email>
|
196
|
-
</send-buyer-message>}
|
197
|
-
end
|
198
|
-
|
199
|
-
def test_behaves_correctly
|
200
|
-
[ :google_order_number, :message, :send_email ].each do |symbol|
|
201
|
-
assert_respond_to @command, symbol
|
202
|
-
end
|
203
|
-
end
|
204
|
-
|
205
|
-
def test_xml_send_email
|
206
|
-
assert_strings_equal(@sample_xml, @command.to_xml)
|
207
|
-
end
|
208
|
-
|
209
|
-
def test_accessors
|
210
|
-
assert_equal('841171949013218', @command.google_order_number)
|
211
|
-
assert_equal('Due to high volume, your order will ship next week. Thank you for your patience.', @command.message)
|
212
|
-
assert @command.send_email
|
213
|
-
end
|
214
|
-
|
215
|
-
def test_to_xml_does_not_raise_exception
|
216
|
-
assert_nothing_raised { @command.to_xml }
|
217
|
-
end
|
218
|
-
|
219
|
-
end
|
@@ -31,138 +31,6 @@ require 'google4r/checkout'
|
|
31
31
|
|
32
32
|
require 'test/frontend_configuration'
|
33
33
|
|
34
|
-
# Tests for the UnarchiveOrderCommand class.
|
35
|
-
class Google4R::Checkout::UnarchiveOrderCommandTest < Test::Unit::TestCase
|
36
|
-
include Google4R::Checkout
|
37
|
-
|
38
|
-
def setup
|
39
|
-
@frontend = Frontend.new(FRONTEND_CONFIGURATION)
|
40
|
-
@command = @frontend.create_unarchive_order_command
|
41
|
-
|
42
|
-
@command.google_order_number = '841171949013218'
|
43
|
-
|
44
|
-
@sample_xml=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
45
|
-
<unarchive-order xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'/>}
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_behaves_correctly
|
49
|
-
[ :google_order_number ].each do |symbol|
|
50
|
-
assert_respond_to @command, symbol
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def test_xml
|
55
|
-
assert_strings_equal(@sample_xml, @command.to_xml)
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_accessors
|
59
|
-
assert_equal('841171949013218', @command.google_order_number)
|
60
|
-
end
|
61
|
-
|
62
|
-
def test_to_xml_does_not_raise_exception
|
63
|
-
assert_nothing_raised { @command.to_xml }
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
#--
|
68
|
-
# Project: google_checkout4r
|
69
|
-
# File: test/unit/unarchive_command_test.rb
|
70
|
-
# Author: Tony Chan <api.htchan at gmail dot com>
|
71
|
-
# Copyright: (c) 2007 by Tony Chan
|
72
|
-
# License: MIT License as follows:
|
73
|
-
#
|
74
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
75
|
-
# a copy of this software and associated documentation files (the
|
76
|
-
# "Software"), to deal in the Software without restriction, including
|
77
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
78
|
-
# distribute, sublicense, and/or sell copies of the Software, and to permit
|
79
|
-
# persons to whom the Software is furnished to do so, subject to the
|
80
|
-
# following conditions:
|
81
|
-
#
|
82
|
-
# The above copyright notice and this permission notice shall be included
|
83
|
-
# in all copies or substantial portions of the Software.
|
84
|
-
#
|
85
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
86
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
87
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
88
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
89
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
90
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
91
|
-
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
92
|
-
#++
|
93
|
-
|
94
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
95
|
-
|
96
|
-
require 'google4r/checkout'
|
97
|
-
|
98
|
-
require 'test/frontend_configuration'
|
99
|
-
|
100
|
-
# Tests for the UnarchiveOrderCommand class.
|
101
|
-
class Google4R::Checkout::UnarchiveOrderCommandTest < Test::Unit::TestCase
|
102
|
-
include Google4R::Checkout
|
103
|
-
|
104
|
-
def setup
|
105
|
-
@frontend = Frontend.new(FRONTEND_CONFIGURATION)
|
106
|
-
@command = @frontend.create_unarchive_order_command
|
107
|
-
|
108
|
-
@command.google_order_number = '841171949013218'
|
109
|
-
|
110
|
-
@sample_xml=%Q{<?xml version='1.0' encoding='UTF-8'?>
|
111
|
-
<unarchive-order xmlns='http://checkout.google.com/schema/2' google-order-number='841171949013218'/>}
|
112
|
-
end
|
113
|
-
|
114
|
-
def test_behaves_correctly
|
115
|
-
[ :google_order_number ].each do |symbol|
|
116
|
-
assert_respond_to @command, symbol
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
def test_xml
|
121
|
-
assert_strings_equal(@sample_xml, @command.to_xml)
|
122
|
-
end
|
123
|
-
|
124
|
-
def test_accessors
|
125
|
-
assert_equal('841171949013218', @command.google_order_number)
|
126
|
-
end
|
127
|
-
|
128
|
-
def test_to_xml_does_not_raise_exception
|
129
|
-
assert_nothing_raised { @command.to_xml }
|
130
|
-
end
|
131
|
-
|
132
|
-
end
|
133
|
-
#--
|
134
|
-
# Project: google_checkout4r
|
135
|
-
# File: test/unit/unarchive_command_test.rb
|
136
|
-
# Author: Tony Chan <api.htchan at gmail dot com>
|
137
|
-
# Copyright: (c) 2007 by Tony Chan
|
138
|
-
# License: MIT License as follows:
|
139
|
-
#
|
140
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
141
|
-
# a copy of this software and associated documentation files (the
|
142
|
-
# "Software"), to deal in the Software without restriction, including
|
143
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
144
|
-
# distribute, sublicense, and/or sell copies of the Software, and to permit
|
145
|
-
# persons to whom the Software is furnished to do so, subject to the
|
146
|
-
# following conditions:
|
147
|
-
#
|
148
|
-
# The above copyright notice and this permission notice shall be included
|
149
|
-
# in all copies or substantial portions of the Software.
|
150
|
-
#
|
151
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
152
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
153
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
154
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
155
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
156
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
157
|
-
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
158
|
-
#++
|
159
|
-
|
160
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
161
|
-
|
162
|
-
require 'google4r/checkout'
|
163
|
-
|
164
|
-
require 'test/frontend_configuration'
|
165
|
-
|
166
34
|
# Tests for the UnarchiveOrderCommand class.
|
167
35
|
class Google4R::Checkout::UnarchiveOrderCommandTest < Test::Unit::TestCase
|
168
36
|
include Google4R::Checkout
|