forked from abandoned/ruby-aaws
/
tc_help.rb
44 lines (31 loc) · 1.05 KB
/
tc_help.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# $Id: tc_help.rb,v 1.3 2010/02/20 17:15:17 ianmacd Exp $
#
require 'test/unit'
require './setup'
class TestHelp < AWSTest
def test_help
h = Help.new( 'ResponseGroup', 'Large' )
rg = ResponseGroup.new( 'Help' )
h.response_group = rg
response = @req.search( h )
# Get a list of valid operations for the Large response group.
#
results = response.help_response[0].information.response_group_information.
valid_operations.operation
# Ensure we got some actual results back.
#
assert( results.size > 0 )
end
def test_help_class_method
response = Amazon::AWS.help( 'ResponseGroup', 'Large' )
# With no response group, Large will be tried. The resulting exception
# will be rescued and the text of the message returned by AWS will be used
# to determine a response group that will work.
#
results = response.help_response[0].information.response_group_information.
valid_operations.operation
# Ensure we got some actual results back.
#
assert( results.size > 0 )
end
end