23 |
sub check_response { |
sub check_response { |
24 |
my $command = shift || die "no command?"; |
my $command = shift || die "no command?"; |
25 |
|
|
26 |
ok( my $xml = $response->$command({ ID => 42 }), "generate response for $command" ); |
my $state = { |
27 |
|
ID => 42, |
28 |
|
}; |
29 |
|
|
30 |
|
ok( my $xml = $response->$command( $state, @_ ), "generate response $command" . dump(@_) ); |
31 |
|
|
32 |
my $file = "$abs_path/response/$command.xml"; |
my $file = "$abs_path/response/$command.xml"; |
33 |
|
|
44 |
check_response( 'InformResponse' ); |
check_response( 'InformResponse' ); |
45 |
check_response( 'GetRPCMethods' ); |
check_response( 'GetRPCMethods' ); |
46 |
check_response( 'Reboot' ); |
check_response( 'Reboot' ); |
47 |
check_response( 'GetParameterNames' ); |
check_response( 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.SerialNumber', 0 ); |
48 |
check_response( 'GetParameterValues' ); |
check_response( 'GetParameterValues' ); |